Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1364652

[PATCH 2/2] tools/gpio: Add missing initialization of device_name

From Geert Uytterhoeven <geert+renesas@glider.be>
Newsgroups linux.kernel
Subject [PATCH 2/2] tools/gpio: Add missing initialization of device_name
Date 2016-03-25 13:40 +0100
Message-ID <rgzbY-1Ed-3@gated-at.bofh.it> (permalink)
References <rgzbY-1Ed-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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>
---
 tools/gpio/lsgpio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/gpio/lsgpio.c b/tools/gpio/lsgpio.c
index 1124da3759424fe6..eb3f56efd2158b4c 100644
--- a/tools/gpio/lsgpio.c
+++ b/tools/gpio/lsgpio.c
@@ -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;
 
-- 
1.9.1

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH 2/2] tools/gpio: Add missing initialization of device_name Geert Uytterhoeven <geert+renesas@glider.be> - 2016-03-25 13:40 +0100
  Re: [PATCH 2/2] tools/gpio: Add missing initialization of device_name Linus Walleij <linus.walleij@linaro.org> - 2016-03-31 12:00 +0200

csiph-web