Skip to content
Snippets Groups Projects
Select Git revision
  • master default protected
  • stable
  • extraversion
  • early-display
  • variant-emmc-nvme-boot
  • 2024-07-19
  • 2024-06-30
  • 2023-10-18
  • 2023-10-10
  • 2023-07-04
  • 2023-01-25
  • v3
  • variant-emmc-nvme-boot
  • 2020-06-01
14 results

ddr

  • Clone with SSH
  • Clone with HTTPS
  • user avatar
    Thierry Reding authored
    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: default avatarThierry Reding <treding@nvidia.com>
    Acked-by: default avatarTim Harvey <tharvey@gateworks.com>
    dc73cbe7
    History
    Name Last commit Last update
    ..