Your whitespace doesn't quite match edk2 coding style guidelines, but we can fix that during commit.
Reviewed-by: Nate DeSimone <nathaniel.l.desim...@intel.com> -----Original Message----- From: Agyeman, Prince <prince.agye...@intel.com> Sent: Wednesday, October 30, 2019 10:05 AM To: devel@edk2.groups.io Cc: Sinha, Ankit <ankit.si...@intel.com>; Desimone, Nathaniel L <nathaniel.l.desim...@intel.com>; Kubacki, Michael A <michael.a.kuba...@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.si...@intel.com> Cc: Nate DeSimone <nathaniel.l.desim...@intel.com> Cc: Kubacki Michael A <michael.a.kuba...@intel.com> Signed-off-by: Prince Agyeman <prince.agye...@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 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#49696): https://edk2.groups.io/g/devel/message/49696 Mute This Topic: https://groups.io/mt/39839161/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-