gnu-efi/0010-Work-around-Werror-maybe-uninitialized-not-being-ver.patch

32 lines
957 B
Diff
Raw Normal View History

From d7e380f0ebf2292ddcd534c407483450b74a9f12 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
Date: Thu, 2 Feb 2017 15:23:55 -0500
Subject: [PATCH 10/22] Work around -Werror=maybe-uninitialized not being very
bright.
The compiler doesn't believe the loop always executes at least once,
even though the data in the first array entry doesn't satisfy the exit
condition. So just initialize the thing to shut it up.
Signed-off-by: Peter Jones <pjones@redhat.com>
---
apps/route80h.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/apps/route80h.c b/apps/route80h.c
index e1f62f06824..5272dd3cd44 100644
--- a/apps/route80h.c
+++ b/apps/route80h.c
@@ -93,7 +93,7 @@ efi_main (EFI_HANDLE image_handle, EFI_SYSTEM_TABLE *systab)
InitializeLib(image_handle, systab);
EFI_PCI_IO *pciio = NULL;
lpcif_t lpcif;
- EFI_STATUS rc;
+ EFI_STATUS rc = EFI_SUCCESS;
struct {
uint16_t vendor;
uint16_t device;
--
2.14.3