[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 5/7] xen/efi: Make efi_start() compile at -Og


  • To: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Mon, 19 Apr 2021 15:01:30 +0100
  • Authentication-results: esa3.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Jan Beulich <JBeulich@xxxxxxxx>
  • Delivery-date: Mon, 19 Apr 2021 14:01:58 +0000
  • Ironport-hdrordr: A9a23:0KAQoKB9VSieYVLlHeh+sceALOonbusQ8zAX/mhsVB1YddGZnc iynPIdkST5kioVRWtIo729EYOLKEm9ybde544NMbC+GDT3oWfAFvAH0aLO4R3FXxf/+OlUyL t6f8FFYuHYIFBmga/BjzWQPM0nxLC8npyAocf74zNTQRpxa6dmhj0JbzqzNkFtXgFJCd4YOf Onl6l6jgGtc3gWcci3b0NtN4T+jubGiY78Zlo+DwMngTPksRqT9LX4HxKEty1uMQ9n/LFKyw n4uj283IqPmbWRyhjQ12jchq4m5efJ+594K+GnzuQQIjXooA60aIpmQK3qhkFInMifrGwEvf OJjxA8P9liy365RBDLnTLdnzPO/Rxry3j+xUSWiXHuyPaJOg4SOo56qq9yNj76gnBQ2+1U4e Zw8E+y86dzN1fmmh/w4tDZPisa7XackD4ZvsM4y0BEXZB2Us42kaUvuHl7Pb0nByzA5IUuAI BVfbvhzccTS1+cYnzD11MfueCEbzA2FheCdEAIptaY5ThQhGx41EsV3qUk7w89yK4=
  • Ironport-sdr: P6yr2jg8xyhDuopW+En6ofy7BsjwOLPEi/Ca3SB/Td7eg3ZR5tda6w7jBiEIQJOYR72MSpS4Dt 7nqi6xygM0kS6eqqRCjGgcPgLKUiGMevz9omQE4ZagNdRcUL6U0u/cZJFSbbXNXxKXU8GmGjPb CBZIFcJhvgLoub85fN79EewHu6uMkCWxV11uwWrLYJcz+qbgJo1NAwb6J4cATgihCjEm0L8cNP bsWmSemPxSINgi443qDy5TPpCk0NXXviH+Vg8gmrxC37em49CfsjhwbF43d8WqCCyxmhCoo/Yi laM=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

When compiling at -Og:

  boot.c: In function 'efi_start':
  boot.c:1339:9: error: 'argc' may be used uninitialized in this function 
[-Werror=maybe-uninitialized]
   1339 |         efi_arch_handle_cmdline(argc ? *argv : NULL, options, name.s);
        |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

although this appears to be limited to the ARM build only.  It also seems to
be bogus, because it is immediately preceding by a read of argc which doesn't
yield a diagnostic.

Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
CC: Jan Beulich <JBeulich@xxxxxxxx>
---
 xen/common/efi/boot.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/common/efi/boot.c b/xen/common/efi/boot.c
index 63e289ab85..f1e7a5267c 100644
--- a/xen/common/efi/boot.c
+++ b/xen/common/efi/boot.c
@@ -1126,7 +1126,7 @@ efi_start(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE 
*SystemTable)
     static EFI_GUID __initdata shim_lock_guid = SHIM_LOCK_PROTOCOL_GUID;
     EFI_LOADED_IMAGE *loaded_image;
     EFI_STATUS status;
-    unsigned int i, argc;
+    unsigned int i, argc = 0;
     CHAR16 **argv, *file_name, *cfg_file_name = NULL, *options = NULL;
     UINTN gop_mode = ~0;
     EFI_SHIM_LOCK_PROTOCOL *shim_lock;
-- 
2.11.0




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.