if/else block default coding style question
Valdis.Kletnieks at vt.edu
Valdis.Kletnieks at vt.edu
Sat Oct 8 15:40:22 EDT 2016
On Sat, 08 Oct 2016 15:19:18 -0000, Nicholas Mc Guire said:
> Thats actually the cause of this mail - it just becaem obvious
> that some of these if==else are intentional
At the very least, the intentional ones need a comment similar to the
one found in file.c
> Now reporting these cases if they should be fixed makes sense
> while if this is accepted practice then it would be reporting
> false-positives, which would be bad.
Coccinelle can only warn about things that syntactically look suspicious.
The person running Coccinelle needs to have enough neurons to double-check
for comments explaining the odd usage, etc - and the person creating that
sort of code needs to leave some bread crumbs for people reading the code.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 484 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20161008/81c27344/attachment.bin
More information about the Kernelnewbies
mailing list