Fix compile errors when disabling compile optimization
- 'OpenFile may be used uninitialized' in ExtLib - 'undefined reference to memcpy' in FatLib - 'Lasa/Laml may be used uninitialized' in TpmLib - 'Adjust may be used uninitialized' in Stage2Support Signed-off-by: Aiden Park <aiden.park@intel.com>
This commit is contained in:
parent
1c64a2d411
commit
b17c6c29b1
|
@ -126,7 +126,8 @@ ExtFsOpenFile (
|
||||||
NameBuffer = AllocatePool (NameSize);
|
NameBuffer = AllocatePool (NameSize);
|
||||||
Status = UnicodeStrToAsciiStrS (FileName, NameBuffer, NameSize);
|
Status = UnicodeStrToAsciiStrS (FileName, NameBuffer, NameSize);
|
||||||
if (EFI_ERROR(Status)) {
|
if (EFI_ERROR(Status)) {
|
||||||
goto Error;
|
FreePool (NameBuffer);
|
||||||
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
OpenFile = (OPEN_FILE *)AllocatePool (sizeof (OPEN_FILE));
|
OpenFile = (OPEN_FILE *)AllocatePool (sizeof (OPEN_FILE));
|
||||||
|
|
|
@ -147,7 +147,7 @@ FindFile (
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
return EFI_NOT_FOUND;
|
return EFI_NOT_FOUND;
|
||||||
} else {
|
} else {
|
||||||
Parent = *File;
|
CopyMem (&Parent, File, sizeof (PEI_FAT_FILE));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
NodeCurr = NodeNext;
|
NodeCurr = NodeNext;
|
||||||
|
|
|
@ -44,6 +44,9 @@ GetTCGLasa (
|
||||||
if (TpmLibData != NULL) {
|
if (TpmLibData != NULL) {
|
||||||
*Lasa = (UINT32) (TpmLibData->LogAreaStartAddress);
|
*Lasa = (UINT32) (TpmLibData->LogAreaStartAddress);
|
||||||
*Laml = TpmLibData->LogAreaMinLength;
|
*Laml = TpmLibData->LogAreaMinLength;
|
||||||
|
} else {
|
||||||
|
*Lasa = 0;
|
||||||
|
*Laml = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -293,6 +293,10 @@ SplitMemroyMap (
|
||||||
// Payload reserved memory
|
// Payload reserved memory
|
||||||
Adjust = PcdGet32 (PcdPayloadReservedMemSize);
|
Adjust = PcdGet32 (PcdPayloadReservedMemSize);
|
||||||
Flag = MEM_MAP_FLAG_PAYLOAD;
|
Flag = MEM_MAP_FLAG_PAYLOAD;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
Adjust = 0;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
if (Adjust == 0) {
|
if (Adjust == 0) {
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in New Issue