[Spice-devel] [spice-xpi 2/2] Use G_GUINT64_FORMAT to print guint64 values

Christophe Fergeau cfergeau at redhat.com
Mon Mar 5 13:10:34 PST 2012


gcc complains about the format string being wrong otherwise (the
modifier to use is compiler/architecture dependant).
---
 SpiceXPI/src/plugin/plugin.cpp |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/SpiceXPI/src/plugin/plugin.cpp b/SpiceXPI/src/plugin/plugin.cpp
index f291888..e53639e 100644
--- a/SpiceXPI/src/plugin/plugin.cpp
+++ b/SpiceXPI/src/plugin/plugin.cpp
@@ -568,7 +568,7 @@ void nsPluginInstance::Connect()
     }
 
     pid_t child = fork();
-    g_debug("child pid: %llu", (guint64)child);
+    g_debug("child pid: %"G_GUINT64_FORMAT, (guint64)child);
     if (child == 0)
     {
         close(pipe_fds[1]);
@@ -770,7 +770,7 @@ void nsPluginInstance::CallOnDisconnected(int code)
 
 void nsPluginInstance::SigchldRoutine(int sig, siginfo_t *info, void *uap)
 {
-    g_debug("child finished, pid: %llu", (guint64)info->si_pid);
+    g_debug("child finished, pid: %"G_GUINT64_FORMAT, (guint64)info->si_pid);
     int exit_code;
     waitpid(info->si_pid, &exit_code, 0);
 
-- 
1.7.7.6



More information about the Spice-devel mailing list