88bff2e18f
a few fixes. OBS-URL: https://build.opensuse.org/request/show/668736 OBS-URL: https://build.opensuse.org/package/show/Virtualization/qemu?expand=0&rev=450
43 lines
1.4 KiB
Diff
43 lines
1.4 KiB
Diff
From 1280c1f65b73d6d0c4833e39a3bb8194bd03f906 Mon Sep 17 00:00:00 2001
|
||
From: Bruce Rogers <brogers@suse.com>
|
||
Date: Fri, 25 Jan 2019 09:37:44 -0700
|
||
Subject: [PATCH] [efi] Simplify diagnostic for NULL handle
|
||
MIME-Version: 1.0
|
||
Content-Type: text/plain; charset=UTF-8
|
||
Content-Transfer-Encoding: 8bit
|
||
|
||
Compiling with GCC 9 now warns as follows:
|
||
interface/efi/efi_debug.c:334:3: error: ‘%s’ directive argument is null [-Werror=format-overflow=]
|
||
334 | printf ( "HANDLE %s could not retrieve protocols\n",
|
||
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||
335 | efi_handle_name ( handle ) );
|
||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||
cc1: all warnings being treated as errors
|
||
|
||
Simplify this diagnostic by simply indicating a <NULL> has been
|
||
passed as a handle.
|
||
|
||
[BR: BSC#1121464]
|
||
Signed-off-by: Bruce Rogers <brogers@suse.com>
|
||
---
|
||
src/interface/efi/efi_debug.c | 3 +--
|
||
1 file changed, 1 insertion(+), 2 deletions(-)
|
||
|
||
diff --git a/src/interface/efi/efi_debug.c b/src/interface/efi/efi_debug.c
|
||
index 8ea0a822..19fba767 100644
|
||
--- a/src/interface/efi/efi_debug.c
|
||
+++ b/src/interface/efi/efi_debug.c
|
||
@@ -331,8 +331,7 @@ void dbg_efi_protocols ( EFI_HANDLE handle ) {
|
||
|
||
/* Sanity check */
|
||
if ( ! handle ) {
|
||
- printf ( "HANDLE %s could not retrieve protocols\n",
|
||
- efi_handle_name ( handle ) );
|
||
+ printf ( "HANDLE <NULL> could not retrieve protocols\n" );
|
||
return;
|
||
}
|
||
|
||
--
|
||
2.20.1
|
||
|