diff options
author | Thierry Reding <treding@nvidia.com> | 2014-08-22 09:46:35 +0200 |
---|---|---|
committer | Stefano Babic <sbabic@denx.de> | 2014-09-09 16:26:33 +0200 |
commit | dc73cbe7b05851a3ff76beabdc0589d2b3ebb9a3 (patch) | |
tree | a5a1590d6c70073e0fda1af8c94c8f4d4b6f2750 /board/csb272/Kconfig | |
parent | 021e79c85371d2d5882f2eb6c58233f016add52d (diff) | |
download | u-boot-imx-dc73cbe7b05851a3ff76beabdc0589d2b3ebb9a3.zip u-boot-imx-dc73cbe7b05851a3ff76beabdc0589d2b3ebb9a3.tar.gz u-boot-imx-dc73cbe7b05851a3ff76beabdc0589d2b3ebb9a3.tar.bz2 |
imx: ventana: Avoid undefined behaviour
The leds array within struct ventana has space for 3 elements, but the
setup_board_gpio() function tries to set up 4 GPIOs for LEDs. Recent
versions of GCC complain about that:
board/gateworks/gw_ventana/gw_ventana.c: In function 'setup_board_gpio':
board/gateworks/gw_ventana/gw_ventana.c:987:27: warning: iteration 3u invokes undefined behavior [-Waggressive-loop-optimizations]
if (gpio_cfg[board].leds[i])
^
board/gateworks/gw_ventana/gw_ventana.c:986:2: note: containing loop
for (i = 0; i < 4; i++) {
^
Fix this by making the upper bound of the loop match the array size.
Signed-off-by: Thierry Reding <treding@nvidia.com>
Acked-by: Tim Harvey <tharvey@gateworks.com>
Diffstat (limited to 'board/csb272/Kconfig')
0 files changed, 0 insertions, 0 deletions