From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mx.groups.io with SMTP id smtpd.web11.7795.1572455077896369576 for ; Wed, 30 Oct 2019 10:04:38 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.24, mailfrom: prince.agyeman@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Oct 2019 10:04:37 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,248,1569308400"; d="scan'208";a="198736462" Received: from paagyema-desk2.amr.corp.intel.com ([10.24.15.58]) by fmsmga008.fm.intel.com with ESMTP; 30 Oct 2019 10:04:36 -0700 From: "Agyeman, Prince" To: devel@edk2.groups.io Cc: Ankit Sinha , Nate DeSimone , Kubacki Michael A Subject: [edk2-platforms] [PATCH] SimicsOpenBoardPkg: Fix gcc build failure Date: Wed, 30 Oct 2019 10:04:36 -0700 Message-Id: <20191030170436.16708-1-prince.agyeman@intel.com> X-Mailer: git-send-email 2.19.1.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Cc: Nate DeSimone Cc: Kubacki Michael A Signed-off-by: Prince Agyeman --- .../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