[Spice-devel] [spice-gtk] Fix printf format string warning
Christophe Fergeau
cfergeau at redhat.com
Wed May 15 02:32:58 PDT 2013
When doing a mingw32 build, I hit the following warning (which became an
error because of -Werror):
channel-display.c: In function 'destroy_stream':
channel-display.c:1546:9: error: format '%lu' expects argument of type 'long unsigned int', but argument 6 has type 'uint64_t' [-Werror=format=]
CHANNEL_DEBUG(channel, "%s: drops total duration %lu ==>", __FUNCTION__, drops_duration_total);
^
---
gtk/channel-display.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gtk/channel-display.c b/gtk/channel-display.c
index 5fb3cac..bc6fc08 100644
--- a/gtk/channel-display.c
+++ b/gtk/channel-display.c
@@ -1510,7 +1510,7 @@ static void destroy_stream(SpiceChannel *channel, int id)
{
SpiceDisplayChannelPrivate *c = SPICE_DISPLAY_CHANNEL(channel)->priv;
display_stream *st;
- uint64_t drops_duration_total = 0;
+ guint64 drops_duration_total = 0;
int i;
g_return_if_fail(c != NULL);
@@ -1543,7 +1543,7 @@ static void destroy_stream(SpiceChannel *channel, int id)
stats->duration);
}
if (st->num_drops_seqs) {
- CHANNEL_DEBUG(channel, "%s: drops total duration %lu ==>", __FUNCTION__, drops_duration_total);
+ CHANNEL_DEBUG(channel, "%s: drops total duration %"G_GUINT64_FORMAT" ==>", __FUNCTION__, drops_duration_total);
}
g_array_free(st->drops_seqs_stats_arr, TRUE);
--
1.8.2.1
More information about the Spice-devel
mailing list