* [Qemu-devel] [PATCH] io: Add missing GCC_FMT_ATTR (fix -Werror=suggest-attribute=format)
@ 2017-10-07 14:56 Stefan Weil
2017-10-09 9:27 ` Daniel P. Berrange
0 siblings, 1 reply; 2+ messages in thread
From: Stefan Weil @ 2017-10-07 14:56 UTC (permalink / raw)
To: Daniel P . Berrange; +Cc: qemu-devel, qemu-trivial, 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 <sw@weilnetz.de>
---
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH] io: Add missing GCC_FMT_ATTR (fix -Werror=suggest-attribute=format)
2017-10-07 14:56 [Qemu-devel] [PATCH] io: Add missing GCC_FMT_ATTR (fix -Werror=suggest-attribute=format) Stefan Weil
@ 2017-10-09 9:27 ` Daniel P. Berrange
0 siblings, 0 replies; 2+ messages in thread
From: Daniel P. Berrange @ 2017-10-09 9:27 UTC (permalink / raw)
To: Stefan Weil; +Cc: qemu-devel, qemu-trivial
On Sat, Oct 07, 2017 at 04:56:09PM +0200, Stefan Weil wrote:
> 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>
> ---
> io/channel-websock.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
Acked-by: Daniel P. Berrange <berrange@redhat.com>
>
> 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;
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-10-09 9:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-07 14:56 [Qemu-devel] [PATCH] io: Add missing GCC_FMT_ATTR (fix -Werror=suggest-attribute=format) Stefan Weil
2017-10-09 9:27 ` Daniel P. Berrange
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).