Skip to content

Commit

Permalink
kconfig: adjust warning message for conflicting types
Browse files Browse the repository at this point in the history
Each symbol must have exactly one type assigned. However, if a symbol happens
to have two different types assigned at runtime, a warning is printed and the
first type is preserved while the second type is being ignored.

The warning message says

type of <symbol name> redefined from <first type> to <second type>

which may be misleading as it may create the impression that the second type
replaces the first type.

This patch clarifies this by changing the warning to

ignoring type redefinition of <symbol name> from <first type> to <second type>

Signed-off-by: Martin Walch <[email protected]>
Acked-by: Wang YanQing <[email protected]>
Reviewed-by: "Yann E. MORIN" <[email protected]>
Signed-off-by: "Yann E. MORIN" <[email protected]>
  • Loading branch information
Martin Walch authored and yann-morin-1998 committed Oct 8, 2013
1 parent 8d9dfe8 commit 57540f1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions scripts/kconfig/menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,10 @@ void menu_set_type(int type)
sym->type = type;
return;
}
menu_warn(current_entry, "type of '%s' redefined from '%s' to '%s'",
sym->name ? sym->name : "<choice>",
sym_type_name(sym->type), sym_type_name(type));
menu_warn(current_entry,
"ignoring type redefinition of '%s' from '%s' to '%s'",
sym->name ? sym->name : "<choice>",
sym_type_name(sym->type), sym_type_name(type));
}

struct property *menu_add_prop(enum prop_type type, char *prompt, struct expr *expr, struct expr *dep)
Expand Down

0 comments on commit 57540f1

Please sign in to comment.