lkml.org 
[lkml]   [2014]   [Sep]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 0/7] Silence even more W=2 warnings
On Tue, Sep 23, 2014 at 08:43:17PM +0000, Rustad, Mark D wrote:
> Well, please consider the specifics. The entire syscall table is initialized
> with a constant pattern to be sure that every item is initialized. Then each
> syscall is initialized into its proper place. The compiler is complaining that
> entries are being initialized twice.
>
> Most of the time, that is not done, and so it may catch a patch foulup or
> something. In this particular case, it is normal and intended. There is
> nothing wrong, so there is no reason to throw a warning for every single
> entry in the table. Which is what happens with clang today.
>
> So the code is correct, but in general the warning can reveal certain issues.
> Just not in this particular usage. This happens to be a warning specific to
> clang at the moment.

Well, I read this as clang is wrong. It looks like the compiler is
unable to understand a perfectly valid usage so it throws a warning. If
we go and fix it in the kernel, we'll be wagging the dog, so to speak.
Which is a no-no obviously.

> That is why it would be more than reasonable for checkpatch to warn on the
> macro introductions. It is certainly a more significant thing than a
> line > 80 characters.

No sorry - I don't agree here. So now you're proposing of adding the
macros *and* checkpatch to warn about them. That's a really wrong thing
to do on so many levels.

...

> Most of the time, it is new instances of warnings that are most likely to
> reveal a problem. Hiding them in a flood of "normal" warnings prevents
> them from ever being seen. And that is a shame.

Sorry, I can only suggest grepping here and also using what Geert
suggested. There's simply no justification IMO to add code to the kernel
for solely silencing warnings.

--
Regards/Gruss,
Boris.
--


\
 
 \ /
  Last update: 2014-09-25 11:01    [W:0.062 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site