Skip to content

Commit

Permalink
FatPkg: Fix potentially uninitialized variable
Browse files Browse the repository at this point in the history
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1559

Initializes the variable to prevent an uninitialized variable
warning in Visual Studio with C4701 enabled.

Signed-off-by: Michael Kubacki <[email protected]>
  • Loading branch information
corthon authored and mergify[bot] committed Oct 25, 2024
1 parent 1c0f3c3 commit 00ccd99
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions FatPkg/EnhancedFatDxe/Info.c
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,8 @@ FatSetFileInfo (
UINT8 NewAttribute;
BOOLEAN ReadOnly;

TempDirEnt = NULL;

ZeroMem (&ZeroTime, sizeof (EFI_TIME));
Parent = OFile->Parent;
DirEnt = OFile->DirEnt;
Expand Down
4 changes: 4 additions & 0 deletions FatPkg/FatPei/FatLiteApi.c
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,8 @@ GetRecoveryCapsuleInfo (
PEI_FILE_HANDLE Handle;
UINTN NumberRecoveryCapsules;

Handle = NULL;

Status = GetNumberRecoveryCapsules (PeiServices, This, &NumberRecoveryCapsules);

if (EFI_ERROR (Status)) {
Expand Down Expand Up @@ -551,6 +553,8 @@ LoadRecoveryCapsule (
PEI_FILE_HANDLE Handle;
UINTN NumberRecoveryCapsules;

Handle = NULL;

Status = GetNumberRecoveryCapsules (PeiServices, This, &NumberRecoveryCapsules);

if (EFI_ERROR (Status)) {
Expand Down

0 comments on commit 00ccd99

Please sign in to comment.