[Spice-devel] [PATCH] ci-fix: use proper format for printing enum value
Victor Toso
victortoso at redhat.com
Wed Sep 26 16:05:46 UTC 2018
From: Victor Toso <me at victortoso.com>
Introduced in the last iteration (v4) by mistake, commit
bd195d3f76f115
usb-device-manager.c: In function ‘channel_event’:
usb-device-manager.c:900:19: error: format ‘%d’ expects argument of
type ‘int’, but argument 4 has type ‘unsigned int’ [-Werror=format=]
g_warning("Unhandled SpiceChannelEvent %d, disconnecting usbredir %p", event, channel);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~
/usr/include/glib-2.0/glib/gmessages.h:339:32: note: in definition of macro ‘g_warning’
__VA_ARGS__)
^~~~~~~~~~~
Also removes extra space.
Signed-off-by: Victor Toso <victortoso at redhat.com>
---
src/usb-device-manager.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/usb-device-manager.c b/src/usb-device-manager.c
index 45adf5a..354038a 100644
--- a/src/usb-device-manager.c
+++ b/src/usb-device-manager.c
@@ -877,7 +877,6 @@ static void channel_destroy(SpiceSession *session, SpiceChannel *channel,
static void channel_event(SpiceChannel *channel, SpiceChannelEvent event,
gpointer user_data)
-
{
SpiceUsbDeviceManager *self = user_data;
@@ -897,7 +896,7 @@ static void channel_event(SpiceChannel *channel, SpiceChannelEvent event,
g_ptr_array_remove(self->priv->channels, channel);
return;
default:
- g_warning("Unhandled SpiceChannelEvent %d, disconnecting usbredir %p", event, channel);
+ g_warning("Unhandled SpiceChannelEvent %u, disconnecting usbredir %p", event, channel);
g_signal_handlers_disconnect_by_func(channel, channel_event, user_data);
g_ptr_array_remove(self->priv->channels, channel);
}
--
2.17.1
More information about the Spice-devel
mailing list