This patch fixes the following Ecc reported error:
There should be no initialization of a variable as
part of its declaration
Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
VOID\r
)\r
{\r
- SEMIHOST_FCB *Fcb = AllocateZeroPool (sizeof (SEMIHOST_FCB));\r
+ SEMIHOST_FCB *Fcb;\r
\r
+ Fcb = AllocateZeroPool (sizeof (SEMIHOST_FCB));\r
if (Fcb != NULL) {\r
CopyMem (&Fcb->File, &gSemihostFsFile, sizeof (gSemihostFsFile));\r
Fcb->Signature = SEMIHOST_FCB_SIGNATURE;\r
OUT EFI_FILE **Root\r
)\r
{\r
- SEMIHOST_FCB *RootFcb = NULL;\r
+ SEMIHOST_FCB *RootFcb;\r
\r
if (Root == NULL) {\r
return EFI_INVALID_PARAMETER;\r
OUT VOID *Buffer\r
)\r
{\r
- EFI_FILE_INFO *Info = NULL;\r
- UINTN NameSize = 0;\r
+ EFI_FILE_INFO *Info;\r
+ UINTN NameSize;\r
UINTN ResultSize;\r
UINTN Index;\r
\r
if (Fcb->IsRoot) {\r
+ NameSize = 0;\r
ResultSize = SIZE_OF_EFI_FILE_INFO + sizeof(CHAR16);\r
} else {\r
NameSize = AsciiStrLen (Fcb->FileName) + 1;\r