summaryrefslogtreecommitdiffstats
path: root/FatPkg/EnhancedFatDxe/Info.c
diff options
context:
space:
mode:
authorBret Barkelew <bret@corthon.com>2024-07-29 21:34:36 -0700
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2024-10-25 18:48:06 +0000
commit00ccd99d46068c87e73e8e521afea09e19419885 (patch)
treed08aa4b7121741459fe78c856d227ef253aa245b /FatPkg/EnhancedFatDxe/Info.c
parent1c0f3c3e41157a71fc206a7b3bbba752c1866dd3 (diff)
downloadedk2-00ccd99d46068c87e73e8e521afea09e19419885.tar.gz
edk2-00ccd99d46068c87e73e8e521afea09e19419885.tar.bz2
edk2-00ccd99d46068c87e73e8e521afea09e19419885.zip
FatPkg: Fix potentially uninitialized variable
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 <michael.kubacki@microsoft.com>
Diffstat (limited to 'FatPkg/EnhancedFatDxe/Info.c')
-rw-r--r--FatPkg/EnhancedFatDxe/Info.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/FatPkg/EnhancedFatDxe/Info.c b/FatPkg/EnhancedFatDxe/Info.c
index d17ce5b7ee..ab06311965 100644
--- a/FatPkg/EnhancedFatDxe/Info.c
+++ b/FatPkg/EnhancedFatDxe/Info.c
@@ -303,6 +303,8 @@ FatSetFileInfo (
UINT8 NewAttribute;
BOOLEAN ReadOnly;
+ TempDirEnt = NULL;
+
ZeroMem (&ZeroTime, sizeof (EFI_TIME));
Parent = OFile->Parent;
DirEnt = OFile->DirEnt;