io: Add missing GCC_FMT_ATTR (fix -Werror=suggest-attribute=format)
PATCH 1/1 io: Add missing GCC_FMT_ATTR (fix -Werror=suggest-attribute=format)
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 <[email protected]>
--- io/channel-websock.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
io/channel-websock.c +4 -3
@@ -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;
Signature · 1 line
2.11.0
Quoted 10 lines · 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 <[email protected]>--- io/channel-websock.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
Quoted 9 lines
io/channel-websock.c +0
-0@@ -151,9 +151,10 @@ enum { QIO_CHANNEL_WEBSOCK_OPCODE_PONG = 0xA };
io/channel-websock.c enum { · line 160
Quoted 10 lines
io/channel-websock.c +4
-3-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
Signature · 3 lines
|: 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 :|