Compiler is producing the warning:
warning: format not a string literal and no format arguments
[-Wformat-security]
This patch makes the format a literal string in printf statements.
This with: gcc version 7.3.0 (Ubuntu 7.3.0-16ubuntu3) in Ubuntu 18.04
Signed-off-by: Paul Schulz <paul@mawsonlakes.org>
static void check_stdin(void)
{
if (!valid_stdin) {
static void check_stdin(void)
{
if (!valid_stdin) {
- printf(_("aborted!\n\n"));
- printf(_("Console input/output is redirected. "));
- printf(_("Run 'make oldconfig' to update configuration.\n\n"));
+ printf("%s",_("aborted!\n\n"));
+ printf("%s",_("Console input/output is redirected. "));
+ printf("%s",_("Run 'make oldconfig' to update configuration.\n\n"));
enum symbol_type type = sym_get_type(sym);
if (!sym_has_value(sym))
enum symbol_type type = sym_get_type(sym);
if (!sym_has_value(sym))
+ printf("%s",_("(NEW) "));
line[0] = '\n';
line[1] = 0;
line[0] = '\n';
line[1] = 0;
if (child->sym->name)
printf(" (%s)", child->sym->name);
if (!sym_has_value(child->sym))
if (child->sym->name)
printf(" (%s)", child->sym->name);
if (!sym_has_value(child->sym))
+ printf("%s",_(" (NEW)"));
printf("\n");
}
printf(_("%*schoice"), indent - 1, "");
printf("\n");
}
printf(_("%*schoice"), indent - 1, "");
}
} else if (input_mode != olddefconfig) {
if (!conf_cnt++)
}
} else if (input_mode != olddefconfig) {
if (!conf_cnt++)
- printf(_("*\n* Restart config...\n*\n"));
+ printf("%s",_("*\n* Restart config...\n*\n"));
rootEntry = menu_get_parent_menu(menu);
conf(rootEntry);
}
rootEntry = menu_get_parent_menu(menu);
conf(rootEntry);
}