[systemd-devel] [PATCH] boot: efi - move background pixel variable into different scope

Marcel Holtmann marcel at holtmann.org
Thu Feb 26 16:35:48 PST 2015


  CC       src/boot/efi/splash.o
src/boot/efi/splash.c: In function ‘graphics_splash’:
src/boot/efi/splash.c:256:9: warning: missing initializer for field ‘Blue’ of ‘EFI_GRAPHICS_OUTPUT_BLT_PIXEL’ [-Wmissing-field-initializers]
         EFI_GRAPHICS_OUTPUT_BLT_PIXEL pixel = { };
         ^
In file included from /usr/include/efi/efi.h:39:0,
                 from src/boot/efi/splash.c:18:
/usr/include/efi/efiprot.h:641:9: note: ‘Blue’ declared here
   UINT8 Blue;
         ^
---
 src/boot/efi/splash.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/boot/efi/splash.c b/src/boot/efi/splash.c
index 3f2aa27ddd20..e5c9d270af0a 100644
--- a/src/boot/efi/splash.c
+++ b/src/boot/efi/splash.c
@@ -253,7 +253,6 @@ EFI_STATUS bmp_to_blt(EFI_GRAPHICS_OUTPUT_BLT_PIXEL *buf,
 }
 
 EFI_STATUS graphics_splash(UINT8 *content, UINTN len, const EFI_GRAPHICS_OUTPUT_BLT_PIXEL *background) {
-        EFI_GRAPHICS_OUTPUT_BLT_PIXEL pixel = {};
         EFI_GUID GraphicsOutputProtocolGuid = EFI_GRAPHICS_OUTPUT_PROTOCOL_GUID;
         EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput = NULL;
         struct bmp_dib *dib;
@@ -266,6 +265,8 @@ EFI_STATUS graphics_splash(UINT8 *content, UINTN len, const EFI_GRAPHICS_OUTPUT_
         EFI_STATUS err;
 
         if (!background) {
+                EFI_GRAPHICS_OUTPUT_BLT_PIXEL pixel;
+
                 if (StriCmp(L"Apple", ST->FirmwareVendor) == 0) {
                         pixel.Red = 0xc0;
                         pixel.Green = 0xc0;
-- 
2.1.0



More information about the systemd-devel mailing list