Skip to contentSkip to conversation

Fix -Wmaybe-uninitialized warning seen with make menuconfig

PATCH In review Anish Bhatt 1 participant 2 messages Nov 27, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix -Wmaybe-uninitialized warning seen with make menuconfig

Fixes the following :

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;

---
 scripts/kconfig/menu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/kconfig/menu.c +1 -1
index a26cc5d..584e0fc 100644
@@ -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;
Signature · 1 line
2.1.3
#1 lore raw

Aah, ignore this please. Somehow I missed the two other recent mail chains about this very thing, and my patch only covers part of it anyways.