Fix dac_main.c: error: format string is not a string literal (potentially insecure)

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2022-11-19 13:17:16 +08:00 committed by Petro Karashchenko
parent 81de5d4c59
commit 0c200b8966

View File

@ -110,7 +110,7 @@ static void print_cmds(FAR const char *header,
size_t ncmds, size_t ncmds,
FAR const char *trailer) FAR const char *trailer)
{ {
printf(header); printf("%s", header);
while (ncmds--) while (ncmds--)
{ {
printf(" %s %s %c", cmds->name, cmds->args, printf(" %s %s %c", cmds->name, cmds->args,
@ -118,7 +118,7 @@ static void print_cmds(FAR const char *header,
cmds++; cmds++;
} }
printf(trailer); printf("%s", trailer);
} }
static const struct command *find_cmd(FAR const char *name, static const struct command *find_cmd(FAR const char *name,