[SLOF] [PATCH] libc: Add missing fallthrough annotation
aik at ozlabs.ru
Sun Jan 24 17:00:10 AEDT 2021
On 23/01/2021 10:34, Segher Boessenkool wrote:
> 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.
SLOF uses -Wall but not -Wextra which produces lot more warnings than
this patch is fixing.
More information about the SLOF