MdePkg: Fix Clang Build Error

Fixed Clang build error introduced by unintialized variables in
6278bbb898

Signed-off-by: Sachin Ganesh <sachinganesh@ami.com>
This commit is contained in:
INDIA\sachinganesh 2025-01-28 15:47:03 +05:30 committed by mergify[bot]
parent 18984b68fe
commit 428cd8a46f

View File

@ -1056,6 +1056,8 @@ PeCoffLoaderRelocateImage (
RelocDir = &Hdr.Te->DataDirectory[0];
}
RelocBase = NULL;
RelocBaseEnd = NULL;
if ((RelocDir != NULL) && (RelocDir->Size > 0)) {
Status = SafeUint32Add (RelocDir->VirtualAddress, (RelocDir->Size - 1), &EndAddress);
if (!RETURN_ERROR (Status)) {
@ -1072,11 +1074,6 @@ PeCoffLoaderRelocateImage (
DEBUG ((DEBUG_ERROR, "Relocation block is not valid\n"));
return RETURN_LOAD_ERROR;
}
} else {
//
// Set base and end to bypass processing below.
//
RelocBase = RelocBaseEnd = NULL;
}
RelocBaseOrg = RelocBase;