public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Takuto Naito" <naitaku@gmail.com>
To: devel@edk2.groups.io
Cc: Takuto Naito <naitaku@gmail.com>,
	Sai Chaganty <rangasai.v.chaganty@intel.com>,
	Nate DeSimone <nathaniel.l.desimone@intel.com>,
	Heng Luo <heng.luo@intel.com>
Subject: [PATCH edk2-platforms v1 2/2] TigerlakeOpenBoardPkg: Fix build error with GCC5
Date: Wed, 24 Feb 2021 10:37:36 +0900	[thread overview]
Message-ID: <20210224013736.74815-3-naitaku@gmail.com> (raw)
In-Reply-To: <20210224013736.74815-1-naitaku@gmail.com>

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>
---
 .../Library/BasePlatformHookLib/BasePlatformHookLib.c     | 8 --------
 .../Library/BoardInitLib/PeiTigerlakeURvpInitPreMemLib.c  | 2 ++
 2 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/Platform/Intel/TigerlakeOpenBoardPkg/Library/BasePlatformHookLib/BasePlatformHookLib.c b/Platform/Intel/TigerlakeOpenBoardPkg/Library/BasePlatformHookLib/BasePlatformHookLib.c
index cc5337698b..0baee8795d 100644
--- a/Platform/Intel/TigerlakeOpenBoardPkg/Library/BasePlatformHookLib/BasePlatformHookLib.c
+++ b/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.
   //
diff --git a/Platform/Intel/TigerlakeOpenBoardPkg/TigerlakeURvp/Library/BoardInitLib/PeiTigerlakeURvpInitPreMemLib.c b/Platform/Intel/TigerlakeOpenBoardPkg/TigerlakeURvp/Library/BoardInitLib/PeiTigerlakeURvpInitPreMemLib.c
index 2ad229c1cd..0bba41e6d4 100644
--- a/Platform/Intel/TigerlakeOpenBoardPkg/TigerlakeURvp/Library/BoardInitLib/PeiTigerlakeURvpInitPreMemLib.c
+++ b/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"));
 
-- 
2.30.1


  parent reply	other threads:[~2021-02-24  1:39 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-24  1:37 [PATCH edk2-platforms v1 0/2] TigerlakeOpenBoardPkg: Fix build error with GCC5 Takuto Naito
2021-02-24  1:37 ` [PATCH edk2-platforms v1 1/2] TigerlakeSiliconPkg: " Takuto Naito
2021-02-24  2:24   ` [edk2-devel] " Heng Luo
2021-02-24  1:37 ` Takuto Naito [this message]
2021-02-24  2:24   ` [edk2-devel] [PATCH edk2-platforms v1 2/2] TigerlakeOpenBoardPkg: " Heng Luo
2021-02-24  2:18 ` [PATCH edk2-platforms v1 0/2] " Nate DeSimone
2021-02-24  2:24 ` Heng Luo
2021-02-25  2:18 ` Nate DeSimone
2021-02-27 14:40   ` Takuto Naito
2021-03-02  2:47     ` Nate DeSimone

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210224013736.74815-3-naitaku@gmail.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox