Skip to contentSkip to conversation

kconfig: adjust warning message for conflicting types

PATCH In review Martin Walch 2 participants 2 messages Oct 2, 2013

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

PATCH 3/4 kconfig: adjust warning message for conflicting types

From: Martin Walch <[email protected]>
Date: Wed, 2 Oct 2013 06:58:01 +0200
Subject: [PATCH 3/4] kconfig: adjust warning message for conflicting types

Adjust warning: a second symbol type does *not* replace the first one.

---
 scripts/kconfig/menu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/kconfig/menu.c +1 -1
index b970101..e511df5 100644
@@ -119,7 +119,7 @@ void menu_set_type(int type)
 		sym->type = type;
 		return;
 	}
-	menu_warn(current_entry, "type of '%s' redefined from '%s' to '%s'",
+	menu_warn(current_entry, "type of '%s' not redefined from '%s' to '%s'",
 	    sym->name ? sym->name : "<choice>",
 	    sym_type_name(sym->type), sym_type_name(type));
 }
Signature · 1 line
1.8.1.5
#1 lore raw

scripts/kconfig/menu.c void menu_set_type(int type) · line 125

Quoted 13 lines · Martin Walch
scripts/kconfig/menu.c +1 -1
index b970101..e511df5 100644
@@ -119,7 +119,7 @@ void menu_set_type(int type)
 		sym->type = type;
 		return;
 	}
-	menu_warn(current_entry, "type of '%s' redefined from '%s' to '%s'",
+	menu_warn(current_entry, "type of '%s' not redefined from '%s' to '%s'",
 	    sym->name ? sym->name : "<choice>",
 	    sym_type_name(sym->type), sym_type_name(type));
 }

The warning is stating that the symbol was attempted to be redefined from one type to another, not that it was successful, so I don't think this patch actually helps make anything clearer. (gcc warns when a symbol is redefined by saying "redefintion of blah".) Perhaps include that the redefinition was ignored?