Browse Source

cli: fix format string clang-10 warning

Fixes:

 cli.c:196:19: error: format string is not a string literal [-Werror=format-nonliteral]

Signed-off-by: Rosen Penev <rosenp@gmail.com>
[split into separate commit]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
Rosen Penev 4 years ago
parent
commit
03dfbbe6fe
1 changed files with 1 additions and 0 deletions
  1. 1 0
      cli.c

+ 1 - 0
cli.c

@@ -185,6 +185,7 @@ static void cli_perror(void)
 	uci_perror(ctx, appname);
 }
 
+__attribute__((format(printf, 1, 2)))
 static void cli_error(const char *fmt, ...)
 {
 	va_list ap;