In do_gpio value is not initialised in the GPIO_OSCILLATE case: cmd_gpio.c: In function ‘do_gpio’: cmd_gpio.c:92:2: warning: ‘value’ may be used uninitialized in this function [-Wmaybe-uninitialized] return value; ^
Returning 0 in this case seems fairly logical. Signed-off-by: Ian Campbell <[email protected]> Cc: Henrik Nordstrom <[email protected]> --- common/cmd_gpio.c | 1 + 1 file changed, 1 insertion(+) diff --git a/common/cmd_gpio.c b/common/cmd_gpio.c index d551415..a43e89e 100644 --- a/common/cmd_gpio.c +++ b/common/cmd_gpio.c @@ -75,6 +75,7 @@ static int do_gpio(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) gpio_set_value(gpio, i&1); } gpio_direction_input(gpio); + value = 0; } else { switch (sub_cmd) { case GPIO_SET: value = 1; break; -- 1.8.5.3 -- You received this message because you are subscribed to the Google Groups "linux-sunxi" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
