@@ -111,8 +111,8 @@ void menu_add_entry(struct symbol *sym);
void menu_end_entry(void);
void menu_add_dep(struct expr *dep);
void menu_add_visibility(struct expr *dep);
-struct property *menu_add_prop(enum prop_type type, char *prompt, struct expr *expr, struct expr *dep);
-struct property *menu_add_prompt(enum prop_type type, char *prompt, struct expr *dep);
+struct property *menu_add_prop(enum prop_type type, const char *prompt, struct expr *expr, struct expr *dep);
+struct property *menu_add_prompt(enum prop_type type, const char *prompt, struct expr *dep);
void menu_add_expr(enum prop_type type, struct expr *expr, struct expr *dep);
void menu_add_symbol(enum prop_type type, struct symbol *sym, struct expr *dep);
void menu_add_option(int token, char *arg);
@@ -124,7 +124,7 @@ void menu_set_type(int type)
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)
+struct property *menu_add_prop(enum prop_type type, const char *prompt, struct expr *expr, struct expr *dep)
{
struct property *prop = prop_alloc(type, current_entry->sym);
@@ -161,7 +161,7 @@ struct property *menu_add_prop(enum prop_type type, char *prompt, struct expr *e
return prop;
}
-struct property *menu_add_prompt(enum prop_type type, char *prompt, struct expr *dep)
+struct property *menu_add_prompt(enum prop_type type, const char *prompt, struct expr *dep)
{
return menu_add_prop(type, prompt, NULL, dep);
}
There is no reason for the prompt argument to be non-const, as it can deal with const objects (eg. hard-coded root-menu label). Furthermore, the next commit will also introduce another source for the root-menu label, which will be explicitly marked const. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> --- scripts/kconfig/lkc.h | 4 ++-- scripts/kconfig/menu.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)