[OpenWrt-Devel] [PATCH uci 1/5] cli: fix format string clang-10 warning

Petr Štetiar ynezz at true.cz
Sat Dec 7 17:52:53 EST 2019


From: Rosen Penev <rosenp at gmail.com>

Fixes:

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

Signed-off-by: Rosen Penev <rosenp at gmail.com>
[split into separate commit]
Signed-off-by: Petr Štetiar <ynezz at true.cz>
---
 cli.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/cli.c b/cli.c
index 8970f4f0b8ce..6ba97ea07424 100644
--- 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;

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list