It is a regression bug introduced by the patch b37b108, it cause GenSec make failure on GCC Env.
Cc: Liming Gao <[email protected]> Cc: Leif Lindholm <[email protected]> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu <[email protected]> --- BaseTools/Source/C/GenSec/GenSec.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/BaseTools/Source/C/GenSec/GenSec.c b/BaseTools/Source/C/GenSec/GenSec.c index 2b2def1..5545f12 100644 --- a/BaseTools/Source/C/GenSec/GenSec.c +++ b/BaseTools/Source/C/GenSec/GenSec.c @@ -1324,11 +1324,11 @@ Returns: // Open file and read contents // DummyFile = fopen (LongFilePath (DummyFileName), "rb"); if (DummyFile == NULL) { Error (NULL, 0, 0001, "Error opening file", DummyFileName); - return EFI_ABORTED; + goto Finish; } fseek (DummyFile, 0, SEEK_END); DummyFileSize = ftell (DummyFile); fseek (DummyFile, 0, SEEK_SET); @@ -1338,22 +1338,22 @@ Returns: DebugMsg (NULL, 0, 9, "Dummy files", "the dummy file name is %s and the size is %u bytes", DummyFileName, (unsigned) DummyFileSize); InFile = fopen(LongFilePath(InputFileName[0]), "rb"); if (InFile == NULL) { Error (NULL, 0, 0001, "Error opening file", InputFileName[0]); - return EFI_ABORTED; + goto Finish; } fseek (InFile, 0, SEEK_END); InFileSize = ftell (InFile); fseek (InFile, 0, SEEK_SET); InFileBuffer = (UINT8 *) malloc (InFileSize); fread(InFileBuffer, 1, InFileSize, InFile); fclose(InFile); DebugMsg (NULL, 0, 9, "Input files", "the input file name is %s and the size is %u bytes", InputFileName[0], (unsigned) InFileSize); if (InFileSize > DummyFileSize){ - if (stricmp(DummyFileBuffer, InFileBuffer + (InFileSize - DummyFileSize)) == 0){ + if (stricmp((CHAR8 *)DummyFileBuffer, (CHAR8 *)(InFileBuffer + (InFileSize - DummyFileSize))) == 0){ SectGuidHeaderLength = InFileSize - DummyFileSize; } } if (SectGuidHeaderLength == 0) { SectGuidAttribute |= EFI_GUIDED_SECTION_PROCESSING_REQUIRED; -- 2.6.1.windows.1 _______________________________________________ edk2-devel mailing list [email protected] https://lists.01.org/mailman/listinfo/edk2-devel

