From 7acd8c9bd25de8e6af84d1696a8f963eac582089 Mon Sep 17 00:00:00 2001 From: Mike Maslenkin Date: Fri, 9 Aug 2024 02:48:34 +0300 Subject: [PATCH] RedfishPkg: PlatformHostInterfaceBmcUsbNicLib: fix compilation warning PlatformHostInterfaceBmcUsbNicLib.c: In function 'CheckBmcUsbNic': PlatformHostInterfaceBmcUsbNicLib.c:1253:14: error: error: 'HandleBuffer' may be used uninitialized in this function [-Werror=maybe-uninitialized] Status = CheckBmcUsbNicOnHandles (BufferSize/sizeof (EFI_HANDLE), HandleBuffer); cc1: all warnings being treated as errors Signed-off-by: Mike Maslenkin --- .../PlatformHostInterfaceBmcUsbNicLib.c | 1 + 1 file changed, 1 insertion(+) diff --git a/RedfishPkg/Library/PlatformHostInterfaceBmcUsbNicLib/PlatformHostInterfaceBmcUsbNicLib.c b/RedfishPkg/Library/PlatformHostInterfaceBmcUsbNicLib/PlatformHostInterfaceBmcUsbNicLib.c index c73e76df57..6cb5a4b5a1 100644 --- a/RedfishPkg/Library/PlatformHostInterfaceBmcUsbNicLib/PlatformHostInterfaceBmcUsbNicLib.c +++ b/RedfishPkg/Library/PlatformHostInterfaceBmcUsbNicLib/PlatformHostInterfaceBmcUsbNicLib.c @@ -1202,6 +1202,7 @@ CheckBmcUsbNic ( DEBUG ((DEBUG_MANAGEABILITY, "%a: Entry, the registration key - 0x%08x.\n", __func__, Registration)); Handle = NULL; + HandleBuffer = NULL; Status = EFI_SUCCESS; do {