qemu-trivial
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-trivial] [PATCH] io: Add missing GCC_FMT_ATTR (fix -Werror=suggest


From: Stefan Weil
Subject: [Qemu-trivial] [PATCH] io: Add missing GCC_FMT_ATTR (fix -Werror=suggest-attribute=format)
Date: Sat, 7 Oct 2017 16:56:09 +0200

This fixes a compiler warning:

/qemu/io/channel-websock.c:163:5: error:
 function might be possible candidate for ‘gnu_printf’ format attribute
 [-Werror=suggest-attribute=format]

Signed-off-by: Stefan Weil <address@hidden>
---
 io/channel-websock.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/io/channel-websock.c b/io/channel-websock.c
index d1d471f86e..7bf1340958 100644
--- a/io/channel-websock.c
+++ b/io/channel-websock.c
@@ -151,9 +151,10 @@ enum {
     QIO_CHANNEL_WEBSOCK_OPCODE_PONG = 0xA
 };
 
-static void qio_channel_websock_handshake_send_res(QIOChannelWebsock *ioc,
-                                                   const char *resmsg,
-                                                   ...)
+static void GCC_FMT_ATTR(2, 3)
+qio_channel_websock_handshake_send_res(QIOChannelWebsock *ioc,
+                                       const char *resmsg,
+                                       ...)
 {
     va_list vargs;
     char *response;
-- 
2.11.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]