Re: [Ksummit-discuss] [PATCH v2 0/3] Maintainer Entry Profiles

Joe Perches
2019-09-13T20:51:30Z

On Fri, 2019-09-13 at 16:17 -0300, Mauro Carvalho Chehab wrote:
> Em Fri, 13 Sep 2019 11:42:38 -0700
> Joe Perches <joe@perches.com> escreveu:
[]
> > Just fyi: for an x86-64 defconfig with gcc 8.3
> >
> > $ { make clean ; make defconfig ; make -j4 W=1 ; } > make.log 2>&1
> >
> > There are ~300 W=1 for non kernel-doc -W<foo> warnings.
> >
> > $ grep -i -P -oh '\[\-W[\w\-]+\]' make.log |sort | uniq -c | sort -rn
> > 163 [-Wmissing-prototypes]
> > 69 [-Wunused-but-set-variable]
> > 16 [-Wempty-body]
> > 10 [-Wtype-limits]
> > 6 [-Woverride-init]
> > 2 [-Wstringop-truncation]
> > 2 [-Wcast-function-type]
> > 1 [-Wunused-but-set-parameter]
>
> On my eyes, it doesn't sound too much.

In general, I agree and most of these are pretty
trivial to remove. It'd just take some time to
remove most of the missing-prototypes and
unused-but-set warnings before being able to
enable the warnings at the default W=0.

> I suspect that,
> with gcc-9, it should produce more warnings, though.

It doesn't though.
At least not so far as I can tell.
gcc-9.1 produces the same output.

$ { make clean ; make defconfig ; make CC=/usr/bin/gcc-9 -j4 W=1 V=1 ; } > make_gcc9.log 2>&1
$ grep -i -P -oh '\[\-W[\w\-]+\]' make_gcc9.log | sort | uniq -c | sort -rn
163 [-Wmissing-prototypes]
69 [-Wunused-but-set-variable]
16 [-Wempty-body]
10 [-Wtype-limits]
6 [-Woverride-init]
2 [-Wstringop-truncation]
2 [-Wcast-function-type]
1 [-Wunused-but-set-parameter]