On Fri, Feb 27, 2015 at 6:12 PM, Marcel Holtmann <mar...@holtmann.org> wrote:
>>>  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;
>>>         ^
>>
>> That patch removes the initializer?
>
> indeed, if you do not have background provided, then it is undefined. And 
> also in the Apple case, the Reserved field would not be set. Anyway, I have 
> no idea on how to fix this compiler warning the right way.
>
> Alternatively doing something like this shuts it up as well:
>
>  EFI_STATUS graphics_splash(UINT8 *content, UINTN len, const 
> EFI_GRAPHICS_OUTPUT_BLT_PIXEL *background) {
> -        EFI_GRAPHICS_OUTPUT_BLT_PIXEL pixel = {};
> +        EFI_GRAPHICS_OUTPUT_BLT_PIXEL pixel = { 0x00, };

I guess we should just add -Wno-missing-field-initializers, like we do
for the systemd code?

Kay
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to