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

Segher Boessenkool segher at kernel.crashing.org
Sat Jan 23 10:34:08 AEDT 2021


Hi!

On Fri, Jan 22, 2021 at 06:24:20PM +0100, Thomas Huth wrote:
> On 22/01/2021 18.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=]
> 
> Is -Wimplicit-fallthrough enabled by default there? Or did you enable it?

It is enabled by -W (aka -Wextra).  Everyone should always use that
option (along with -Wall), but I do not know if SLOF does.


Segher


More information about the SLOF mailing list