public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Nate DeSimone" <nathaniel.l.desimone@intel.com>
To: "Agyeman, Prince" <prince.agyeman@intel.com>,
	"devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: "Sinha, Ankit" <ankit.sinha@intel.com>,
	"Kubacki, Michael A" <michael.a.kubacki@intel.com>
Subject: Re: [edk2-platforms] [PATCH] SimicsOpenBoardPkg: Fix gcc build failure
Date: Thu, 31 Oct 2019 01:33:22 +0000	[thread overview]
Message-ID: <02A34F284D1DA44BB705E61F7180EF0AB5B86FB6@ORSMSX113.amr.corp.intel.com> (raw)
In-Reply-To: <20191030170436.16708-1-prince.agyeman@intel.com>

Your whitespace doesn't quite match edk2 coding style guidelines, but we can fix that during commit.

Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com>

-----Original Message-----
From: Agyeman, Prince <prince.agyeman@intel.com> 
Sent: Wednesday, October 30, 2019 10:05 AM
To: devel@edk2.groups.io
Cc: Sinha, Ankit <ankit.sinha@intel.com>; Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>; Kubacki, Michael A <michael.a.kubacki@intel.com>
Subject: [edk2-platforms] [PATCH] SimicsOpenBoardPkg: Fix gcc build failure

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/B
+++ dsPlatform.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-31  1:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-30 17:04 [edk2-platforms] [PATCH] SimicsOpenBoardPkg: Fix gcc build failure Agyeman, Prince
2019-10-31  1:33 ` Nate DeSimone [this message]
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=02A34F284D1DA44BB705E61F7180EF0AB5B86FB6@ORSMSX113.amr.corp.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