Messages in this thread |  | | From | David Binderman <> | Subject | RE: linux-4.1-rc7/drivers/irqchip/irq-renesas-intc-irqpin.c:418: array index used before limits check ? | Date | Mon, 8 Jun 2015 13:16:19 +0000 |
| |
Hello there Thomas,
---------------------------------------- >> [linux-4.1-rc7/drivers/irqchip/irq-renesas-intc-irqpin.c:418]: (style) Array ind >> ex 'k' is used before limits check. >> >> if (!io[k] && k < INTC_IRQPIN_REG_NR_MANDATORY) { >> >> Suggest sanity check array index before use. > > Which version of gcc is being stupid here?
None of them.
The original "(style)" message is from a static analysis tool called cppcheck.
I can't think of a situation where, if an array index needs checking, then it should be checked *after* use.
Regards
David Binderman
|  |