[Spice-devel] [spice-xpi 4/4] Fix printf-format string

Christophe Fergeau cfergeau at redhat.com
Tue Apr 3 07:38:07 PDT 2012


Use %z modifier for ssize_t variables, and for an uint32_t variable,
the %l modifier shouldn't be neeeded.
---
 SpiceXPI/src/plugin/controller.cpp |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/SpiceXPI/src/plugin/controller.cpp b/SpiceXPI/src/plugin/controller.cpp
index 4c6ce9f..b912c27 100644
--- a/SpiceXPI/src/plugin/controller.cpp
+++ b/SpiceXPI/src/plugin/controller.cpp
@@ -146,7 +146,7 @@ uint32_t SpiceController::Write(const void *lpBuffer, uint32_t nBytesToWrite)
 
     if (len != (ssize_t)nBytesToWrite)
     {
-        g_warning("incomplete send, bytes to write = %lu, bytes written = %d: %s",
+        g_warning("incomplete send, bytes to write = %u, bytes written = %zd: %s",
                   nBytesToWrite, len, g_strerror(errno));
     }
 
-- 
1.7.9.3



More information about the Spice-devel mailing list