hw/slavio_intctl.c: fix gcc warning about array bounds overrun
commitc84a88d8cb298b6757ad01a12a8bbba66cb6eaa2
authorPeter Maydell <peter.maydell@linaro.org>
Mon, 31 Jan 2011 10:42:26 +0000 (31 10:42 +0000)
committerBlue Swirl <blauwirbel@gmail.com>
Tue, 1 Feb 2011 17:02:15 +0000 (1 17:02 +0000)
tree86a87370d9d96ddf17ce862fb3d633b018caffae
parent60f356e86d66a4a22530ec7570f7582af602d200
hw/slavio_intctl.c: fix gcc warning about array bounds overrun

The Ubuntu 10.10 gcc for ARM complains that we might be overrunning
the cpu_irqs[][] array: silence this by correcting the bounds on the
loop. (In fact we would not have overrun the array because bit
MAX_PILS in pil_pending and irl_out will always be 0.)

Also add a comment about why the loop's lower bound is OK.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
hw/slavio_intctl.c