tools/gpio: Add missing initialization of device_name
authorGeert Uytterhoeven <geert+renesas@glider.be>
Fri, 25 Mar 2016 12:36:30 +0000 (13:36 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Thu, 31 Mar 2016 09:51:30 +0000 (11:51 +0200)
lsgpio.c: In function ‘main’:
lsgpio.c:166:7: warning: ‘device_name’ may be used uninitialized in this functio
n [-Wmaybe-uninitialized]
   ret = list_device(device_name);
       ^

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
tools/gpio/lsgpio.c

index 1124da3759424fe6e6302d538b6715486872cab9..eb3f56efd2158b4c73fa86b6ce44020df9613095 100644 (file)
@@ -147,7 +147,7 @@ void print_usage(void)
 
 int main(int argc, char **argv)
 {
-       const char *device_name;
+       const char *device_name = NULL;
        int ret;
        int c;