]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools: Fix GenSec GCC make failure
authorYonghong Zhu <yonghong.zhu@intel.com>
Tue, 5 Dec 2017 13:52:40 +0000 (21:52 +0800)
committerYonghong Zhu <yonghong.zhu@intel.com>
Wed, 6 Dec 2017 01:46:41 +0000 (09:46 +0800)
It is a regression bug introduced by the patch b37b108, it cause GenSec
make failure on GCC Env.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Tested-by: Leif Lindholm <leif.lindholm@linaro.org>
Tested-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
BaseTools/Source/C/GenSec/GenSec.c

index 2b2def12618797e5d10e528d4a1209eacbb32777..5545f12b74a8d2c15a70950ea57e45ce92a7cadb 100644 (file)
@@ -1326,7 +1326,7 @@ Returns:
       DummyFile = fopen (LongFilePath (DummyFileName), "rb");\r
       if (DummyFile == NULL) {\r
         Error (NULL, 0, 0001, "Error opening file", DummyFileName);\r
-        return EFI_ABORTED;\r
+        goto Finish;\r
       }\r
 \r
       fseek (DummyFile, 0, SEEK_END);\r
@@ -1340,7 +1340,7 @@ Returns:
       InFile = fopen(LongFilePath(InputFileName[0]), "rb");\r
       if (InFile == NULL) {\r
         Error (NULL, 0, 0001, "Error opening file", InputFileName[0]);\r
-        return EFI_ABORTED;\r
+        goto Finish;\r
       }\r
 \r
       fseek (InFile, 0, SEEK_END);\r
@@ -1351,7 +1351,7 @@ Returns:
       fclose(InFile);\r
       DebugMsg (NULL, 0, 9, "Input files", "the input file name is %s and the size is %u bytes", InputFileName[0], (unsigned) InFileSize);\r
       if (InFileSize > DummyFileSize){\r
-        if (stricmp(DummyFileBuffer, InFileBuffer + (InFileSize - DummyFileSize)) == 0){\r
+        if (stricmp((CHAR8 *)DummyFileBuffer, (CHAR8 *)(InFileBuffer + (InFileSize - DummyFileSize))) == 0){\r
           SectGuidHeaderLength = InFileSize - DummyFileSize;\r
         }\r
       }\r