Posted Dec 8, 2011 16:02 UTC (Thu) by nteon (subscriber, #53899)
Parent article: Irked by NO_IRQ
Wouldn't changing all the places irq's are stored to unsigned allow gcc's -Wsign-compare to point out where (irq < 0) happens? It seems like this would be fairly straightforward for structures.
Posted Dec 8, 2011 18:32 UTC (Thu) by clugstj (subscriber, #4020)
[Link]
And then you'd have to sift through the 5 bazillion false positives.
Irked by NO_IRQ
Posted Dec 15, 2011 17:03 UTC (Thu) by Tov (guest, #61080)
[Link]
Wouldn't they be "other positives" instead of just "false positives"?
In what type of robust code is (var < 0) considered a valid comparison on an unsigned value?