ソースを参照

TigerlakeOpenBoardPkg: Fix build error with GCC5

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3224

Fix build errors caused by "-Werror=unused-but-set-variable" with GCC5.
These build errors occur only with DEBUG target because
RELEASE_GCC5_X64_CC_FLAGS has "-Wno-unused-but-set-variable",
but DEBUG_GCC5_X64_CC_FLAGS doesn't.

Cc: Sai Chaganty <rangasai.v.chaganty@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Heng Luo <heng.luo@intel.com>
Signed-off-by: Takuto Naito <naitaku@gmail.com>
Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
Reviewed-by: Heng Luo <heng.luo@intel.com>
Takuto Naito 3 年 前
コミット
9951457625

+ 0 - 8
Platform/Intel/TigerlakeOpenBoardPkg/Library/BasePlatformHookLib/BasePlatformHookLib.c

@@ -182,14 +182,6 @@ PlatformHookSerialPortInitialize (
   VOID
   )
 {
-  UINT16  IndexPort;
-  UINT16  DataPort;
-  UINT8   Index;
-
-  IndexPort = 0;
-  DataPort = 0;
-  Index = 0;
-
   //
   // Enable I/O decoding for COM1(3F8h-3FFh), COM2(2F8h-2FFh), I/O port 2Eh/2Fh, 4Eh/4Fh, 60h/64Fh and 62h/66h.
   //

+ 2 - 0
Platform/Intel/TigerlakeOpenBoardPkg/TigerlakeURvp/Library/BoardInitLib/PeiTigerlakeURvpInitPreMemLib.c

@@ -393,6 +393,7 @@ TigerlakeURvpInitPreMem (
   /// Performing PlatformInitPreMemCallBack after PeiReadOnlyVariable2 PPI produced
   ///
   Status = PeiServicesNotifyPpi (&mPreMemNotifyList);
+  ASSERT_EFI_ERROR (Status);
 
   ///
   /// After code reorangized, memorycallback will run because the PPI is already
@@ -400,6 +401,7 @@ TigerlakeURvpInitPreMem (
   /// done before.
   ///
   Status = PeiServicesNotifyPpi (&mMemDiscoveredNotifyList);
+  ASSERT_EFI_ERROR (Status);
 
   DEBUG ((DEBUG_INFO, "TigerlakeURvpInitPreMem End!\n"));