Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.openwrt.org/project/libubox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetr Štetiar <ynezz@true.cz>2019-12-07 15:34:25 +0300
committerPetr Štetiar <ynezz@true.cz>2019-12-08 01:47:03 +0300
commit46f8268b4b5b808b4979f1e21c71e4dc6288635d (patch)
tree689dfee9dcb6ca625806e1345d0ea14c6c5bcf5d /blobmsg.c
parenteb216a952407cae6cb8c456e1178721d4e6b36da (diff)
blobmsg/ulog: fix format string compiler warnings
Fixes following compiler warnings: blobmsg.c:242:39: error: format string is not a string literal [-Werror,-Wformat-nonliteral] blobmsg.c:248:23: error: format string is not a string literal [-Werror,-Wformat-nonliteral] ulog.c:100:18: error: format string is not a string literal [-Werror,-Wformat-nonliteral] ulog.c:112:16: error: format string is not a string literal [-Werror,-Wformat-nonliteral] ulog.c:117:20: error: format string is not a string literal [-Werror,-Wformat-nonliteral] Signed-off-by: Petr Štetiar <ynezz@true.cz>
Diffstat (limited to 'blobmsg.c')
-rw-r--r--blobmsg.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/blobmsg.c b/blobmsg.c
index a860483..97e0c20 100644
--- a/blobmsg.c
+++ b/blobmsg.c
@@ -230,8 +230,8 @@ blobmsg_open_nested(struct blob_buf *buf, const char *name, bool array)
return (void *)offset;
}
-int
-blobmsg_vprintf(struct blob_buf *buf, const char *name, const char *format, va_list arg)
+__attribute__((format(printf, 3, 0)))
+int blobmsg_vprintf(struct blob_buf *buf, const char *name, const char *format, va_list arg)
{
va_list arg2;
char cbuf;
@@ -251,8 +251,8 @@ blobmsg_vprintf(struct blob_buf *buf, const char *name, const char *format, va_l
return ret;
}
-int
-blobmsg_printf(struct blob_buf *buf, const char *name, const char *format, ...)
+__attribute__((format(printf, 3, 4)))
+int blobmsg_printf(struct blob_buf *buf, const char *name, const char *format, ...)
{
va_list ap;
int ret;