Skip to content

Commit

Permalink
board: gateworks: gw_ventana: fix building with GCC 12.2
Browse files Browse the repository at this point in the history
Building with GCC 12.2 results in an error

    board/gateworks/gw_ventana/gw_ventana.c:636:68: error: the comparison
    will always evaluate as 'true' for the address of 'pwm_padmux' will
    never be NULL [-Werror=address]
      636 |                 } else if (hwconfig_subarg_cmp(arg, "mode", "pwm") &&
          |                                                                    ^~

Remove the superfluous check.

Signed-off-by: Heinrich Schuchardt <[email protected]>
Reviewed-By: Tim Harvey <[email protected]>
Reviewed-by: Fabio Estevam <[email protected]>
  • Loading branch information
xypron authored and trini committed Oct 22, 2022
1 parent 9259bd1 commit 65e8b64
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions board/gateworks/gw_ventana/gw_ventana.c
Original file line number Diff line number Diff line change
Expand Up @@ -633,8 +633,7 @@ void setup_board_gpio(int board, struct ventana_board_info *info)
ctrl);
gpio_requestf(cfg->gpio_param, "dio%d", i);
gpio_direction_input(cfg->gpio_param);
} else if (hwconfig_subarg_cmp(arg, "mode", "pwm") &&
cfg->pwm_padmux) {
} else if (hwconfig_subarg_cmp(arg, "mode", "pwm")) {
if (!cfg->pwm_param) {
printf("DIO%d: Error: pwm config invalid\n",
i);
Expand Down

0 comments on commit 65e8b64

Please sign in to comment.