From 14a39ceeb99060eae4088513e0e81f5946c442fd Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrange" Date: Wed, 20 Dec 2017 17:57:02 +0100 Subject: [PATCH 22/42] io: Add missing GCC_FMT_ATTR (fix -Werror=suggest-attribute=format) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit RH-Author: Daniel P. Berrange Message-id: <20171220175702.29663-21-berrange@redhat.com> Patchwork-id: 78473 O-Subject: [RHV-7.5 qemu-kvm-rhev PATCH v2 20/20] io: Add missing GCC_FMT_ATTR (fix -Werror=suggest-attribute=format) Bugzilla: 1518649 RH-Acked-by: John Snow RH-Acked-by: Jeffrey Cody RH-Acked-by: Miroslav Rezanina From: Stefan Weil 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 Acked-by: Daniel P. Berrange Signed-off-by: Michael Tokarev (cherry picked from commit 52aa5644e8e89ebfc3b1d0abdb7cc502ce9db599) Signed-off-by: Miroslav Rezanina --- 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 df2c3a9..87ebdeb 100644 --- a/io/channel-websock.c +++ b/io/channel-websock.c @@ -152,9 +152,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; -- 1.8.3.1