Re: [spice-gtk] Fix printf format string warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



ACK.

On 05/15/2013 11:32 AM, Christophe Fergeau wrote:
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);

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]