Hi Tim Harvey,

I am afraid I see a warning when building gw_ventana board.



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++) {
  ^
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++) {
  ^




The for statement in line 986 iterates 4 times,
but the array size of gpio_cfg[board].leds[i] is 2 or 3.


Best Regards
Masahiro Yamada

_______________________________________________
U-Boot mailing list
[email protected]
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to