aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorPaul Schulz <paul@mawsonlakes.org>2018-06-21 18:19:39 +0930
committerJohn Crispin <john@phrozen.org>2018-07-30 10:43:36 +0200
commit7bbd1855cd06db7552c14d91f1151c8100e8813e (patch)
tree09a62bf4a3ab21243c5a816d53cadf4d8a6b952c /scripts
parentc128371124ce4d197a5fbc00e42b58e9d82c571e (diff)
downloadupstream-7bbd1855cd06db7552c14d91f1151c8100e8813e.tar.gz
upstream-7bbd1855cd06db7552c14d91f1151c8100e8813e.tar.bz2
upstream-7bbd1855cd06db7552c14d91f1151c8100e8813e.zip
config: Change conf.c remove compiler warnings
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>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/config/conf.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/scripts/config/conf.c b/scripts/config/conf.c
index 6d35957afe..cf20e0a216 100644
--- a/scripts/config/conf.c
+++ b/scripts/config/conf.c
@@ -75,9 +75,9 @@ static void strip(char *str)
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"));
exit(1);
}
}
@@ -87,7 +87,7 @@ static int conf_askvalue(struct symbol *sym, const char *def)
enum symbol_type type = sym_get_type(sym);
if (!sym_has_value(sym))
- printf(_("(NEW) "));
+ printf("%s",_("(NEW) "));
line[0] = '\n';
line[1] = 0;
@@ -288,7 +288,7 @@ static int conf_choice(struct menu *menu)
if (child->sym->name)
printf(" (%s)", child->sym->name);
if (!sym_has_value(child->sym))
- printf(_(" (NEW)"));
+ printf("%s",_(" (NEW)"));
printf("\n");
}
printf(_("%*schoice"), indent - 1, "");
@@ -436,7 +436,7 @@ static void check_conf(struct menu *menu)
}
} 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);
}