[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Pioneer DVR-106D issues



> CWOPTS=         -Wall -Wtraditional \
>                 -Wshadow -Wmissing-prototypes -Wstrict-prototypes

I apologize.

It troubled me that I got no warnings from kernel source but several
warnings from build tools. I rechecked my test setup and found that I
had appended the additional warning options only to HOSTCFLAGS, not the
real CFLAGS. Adding these options to the real CFLAGS made a huge
difference indeed.

Both -Wshadow and -Wmissing-prototypes gave hundreds, if not thousands,
of warnings. I have not yet found that they show any real problem, so
far they are just noise (like using the same function names locally as
the userspace C library does, although libc is nether linked nor the
headers included (-nostdinc)). But I believe there could be useful
warnings too.

So these warnings are worth investigating but not worth including the
options in kernel tree IMHO - they produce too much noise that is not
useful. Kernel coding style does not mandate using function prototypes
for each and every local function in C code (and rightfully so),
-Wmissing-prototypes would change that with questionable gain
(-Wstrict-prototypes should be enough in practice). -Wshadow gives too
many false positives about C and math libraries that are not in use.

That said, I think it's worth to sometimes turn on more warning options,
go over the huge output and see if there are any useful warnings. Plain
-W is also worhth checking, and maybe -Wcast-align.

I'll see if I can do it during the holidays.

-- 
Meelis Roos (mroos@linux.ee)



Reply to: