kconfig: Warn if there is more than one help text
[carl9170fw.git] / config / zconf.y
index f2b97443142dbc734efacd913a274a89f1167f16..4dad8e5c620b1012e089f5486e491661a27fdcaf 100644 (file)
@@ -431,6 +431,11 @@ help_start: T_HELP T_EOL
 
 help: help_start T_HELPTEXT
 {
+       if (current_entry->help) {
+               free(current_entry->help);
+               zconfprint("warning: '%s' defined with more than one help text -- only the last one will be used",
+                          current_entry->sym->name ?: "<choice>");
+       }
        current_entry->help = $2;
 };