public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kconfig: plug false-positive warning in get_prompt_str() seen with gcc-4.9
@ 2014-05-25 16:47 Konstantin Khlebnikov
  2014-05-25 23:18 ` Kirill A. Shutemov
  2014-06-23  5:48 ` Uwe Kleine-König
  0 siblings, 2 replies; 4+ messages in thread
From: Konstantin Khlebnikov @ 2014-05-25 16:47 UTC (permalink / raw)
  To: Yann E. MORIN, linux-kbuild; +Cc: linux-kernel

scripts/kconfig/menu.c: In function ‘get_symbol_str’:
scripts/kconfig/menu.c:590:18: warning: ‘jump’ may be used uninitialized in this function [-Wmaybe-uninitialized]
     jump->offset = strlen(r->s);
                  ^
scripts/kconfig/menu.c:551:19: note: ‘jump’ was declared here
  struct jump_key *jump;
                   ^

Signed-off-by: Konstantin Khlebnikov <koct9i@gmail.com>
---
 scripts/kconfig/menu.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c
index 3ac2c9c..5cd0f5e 100644
--- a/scripts/kconfig/menu.c
+++ b/scripts/kconfig/menu.c
@@ -548,7 +548,7 @@ static void get_prompt_str(struct gstr *r, struct property *prop,
 {
 	int i, j;
 	struct menu *submenu[8], *menu, *location = NULL;
-	struct jump_key *jump;
+	struct jump_key *jump = NULL;
 
 	str_printf(r, _("Prompt: %s\n"), _(prop->text));
 	menu = prop->menu->parent;


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-06-23  9:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-25 16:47 [PATCH] kconfig: plug false-positive warning in get_prompt_str() seen with gcc-4.9 Konstantin Khlebnikov
2014-05-25 23:18 ` Kirill A. Shutemov
2014-06-23  5:48 ` Uwe Kleine-König
2014-06-23  9:29   ` David Rientjes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox