cli: fix format string clang-10 warning
authorRosen Penev <rosenp@gmail.com>
Sat, 7 Dec 2019 21:52:49 +0000 (22:52 +0100)
committerPetr Štetiar <ynezz@true.cz>
Sat, 7 Dec 2019 22:14:01 +0000 (23:14 +0100)
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>
cli.c

diff --git a/cli.c b/cli.c
index 8970f4f0b8cec1f0eed0804272e22bcfeb06d667..6ba97ea0742494831edf468f6b16ddd33ea2f479 100644 (file)
--- a/cli.c
+++ b/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;