[lkml]   [2015]   [Jun]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRE: linux-4.1-rc7/drivers/irqchip/irq-renesas-intc-irqpin.c:418: array index used before limits check ?
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.


David Binderman

 \ /
  Last update: 2015-06-08 15:41    [W:0.083 / U:2.392 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site