From 14a39ceeb99060eae4088513e0e81f5946c442fd Mon Sep 17 00:00:00 2001
From: "Daniel P. Berrange" <berrange@redhat.com>
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 <berrange@redhat.com>
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 <jsnow@redhat.com>
RH-Acked-by: Jeffrey Cody <jcody@redhat.com>
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
From: Stefan Weil <sw@weilnetz.de>
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 <sw@weilnetz.de>
Acked-by: Daniel P. Berrange <berrange@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
(cherry picked from commit 52aa5644e8e89ebfc3b1d0abdb7cc502ce9db599)
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
---
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