public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Agyeman, Prince" <prince.agyeman@intel.com>
To: devel@edk2.groups.io
Cc: Ankit Sinha <ankit.sinha@intel.com>,
	Nate DeSimone <nathaniel.l.desimone@intel.com>,
	Kubacki Michael A <michael.a.kubacki@intel.com>
Subject: [edk2-platforms] [PATCH] SimicsOpenBoardPkg: Fix gcc build failure
Date: Wed, 30 Oct 2019 10:04:36 -0700	[thread overview]
Message-ID: <20191030170436.16708-1-prince.agyeman@intel.com> (raw)

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

Currently, gcc 5 encounters an error "unused-but-set-variable" in
BdsPlatform.c  as a result of a Status variable not being used
after it's set.

This was fixed by printing the Status variable when
EfiBootManagerDeleteLoadOptionVariable function encounters an error

Cc: Ankit Sinha <ankit.sinha@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Kubacki Michael A <michael.a.kubacki@intel.com>

Signed-off-by: Prince Agyeman <prince.agyeman@intel.com>
---
 .../Library/PlatformBootManagerLib/BdsPlatform.c              | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Platform/Intel/SimicsOpenBoardPkg/Library/PlatformBootManagerLib/BdsPlatform.c b/Platform/Intel/SimicsOpenBoardPkg/Library/PlatformBootManagerLib/BdsPlatform.c
index 7aa3860f75..a4b010be63 100644
--- a/Platform/Intel/SimicsOpenBoardPkg/Library/PlatformBootManagerLib/BdsPlatform.c
+++ b/Platform/Intel/SimicsOpenBoardPkg/Library/PlatformBootManagerLib/BdsPlatform.c
@@ -348,6 +348,10 @@ PlatformBootManagerBeforeConsole (
   NvBootOptions = EfiBootManagerGetLoadOptions (&NvBootOptionCount, LoadOptionTypeBoot);
   for (Index = 0; Index < NvBootOptionCount; Index++) {
     Status = EfiBootManagerDeleteLoadOptionVariable (NvBootOptions[Index].OptionNumber, LoadOptionTypeBoot);
+    if(EFI_ERROR (Status)){
+      DEBUG ((DEBUG_ERROR,
+          "%a: removing Boot#%04x %r\n", __FUNCTION__, (UINT32)NvBootOptions[Index].OptionNumber, Status));
+    }
   }
 
   InstallDevicePathCallback ();
-- 
2.19.1.windows.1


             reply	other threads:[~2019-10-30 17:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-30 17:04 Agyeman, Prince [this message]
2019-10-31  1:33 ` [edk2-platforms] [PATCH] SimicsOpenBoardPkg: Fix gcc build failure Nate DeSimone
2019-10-31  7:10 ` Kubacki, Michael A

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=20191030170436.16708-1-prince.agyeman@intel.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