Messages in this thread | | | Subject | Re: WARNING: Unnecessary parentheses - maybe == should be = ? | From | Joe Perches <> | Date | Mon, 10 Feb 2014 09:19:46 -0800 |
| |
On Mon, 2014-02-10 at 12:27 +0300, Dan Carpenter wrote: > These messages are terrifying...
Hey Dan.
Do bumps in the night keep you up too? :)
> We do not want to encourage a million > first patch submitters to start introducing = vs == bugs.
Definitely true and I didn't think of that.
> Did you look through the warning messages this generates? Was it ever > appropriate to change the == to =?
I didn't check. My thought was that this was for patches not files and the use of:
if ((foo == bar))
in a patch was excessive parentheses. The reason to use the ((foo == bar)) form is when the intent is to assign.
> Please remove the second part of that message.
Maybe emit it when what being scanned is a patch, but not a file and only emit the excessive parens when it's a file.
> Also there needs to be a mailing list for checkpatch.pl. LKML is a > write only archive, but it's not a discussion list.
<shrug>.
A mailing list just for checkpatch seems excessive.
Maybe a combined source tools mailing list for scripts/ would be better and maybe smatch should be there too.
> Also the seq_puts() warning messages should be put under --strict > because we have to fight against people submitting those patches.
Another <shrug>.
I still kind of like the seq_printf macro hack. http://lkml.org/lkml/2013/3/16/79
| |