[SLOF] [PATCH] libc: Add missing fallthrough annotation

Thomas Huth thuth at redhat.com
Mon Jan 25 17:22:25 AEDT 2021

On 24/01/2021 17.27, Philippe Mathieu-Daudé wrote:
> On Sun, Jan 24, 2021 at 7:05 AM Alexey Kardashevskiy <aik at ozlabs.ru> wrote:
>> On 23/01/2021 04:21, Philippe Mathieu-Daudé wrote:
>>> Silence warning when cross-compiling with GCC on Debian 10:
>>>     $ s390x-linux-gnu-gcc --version
>>>     s390x-linux-gnu-gcc (Debian 8.3.0-2) 8.3.0
>>>     lib/libc/stdio/vsnprintf.c: In function 'print_format':
>>>     lib/libc/stdio/vsnprintf.c:165:11: warning: this statement may fall through [-Wimplicit-fallthrough=]
>>>          upper = true;
>>>          ~~~~~~^~~~~~
>>>     lib/libc/stdio/vsnprintf.c:166:4: note: here
>>>         case 'x':
>>>         ^~~~
>>> Signed-off-by: Philippe Mathieu-Daudé <f4bug at amsat.org>
>> How did you trigger this exactly? If it is s390's qemu flags as Thomas
>> says, then i am going to nack this and request a patch fixing all
>> -Wextra and not just some reused bits, or wait until i do this myself :)
> I haven't set any flag, and I don't think QEMU flags are passed because
> QEMU sets convert warnings to errors.

See pc-bios/s390-ccw/Makefile in the QEMU sources:

  QEMU_CFLAGS := -Wall $(filter -W%, $(QEMU_CFLAGS))

Thus it's picking up the warnings from QEMU_CFLAGS. Not sure about -Werror, 
though, seems like the QEMU build system now handles this flag in a 
different spot.


More information about the SLOF mailing list