[Spice-devel] [vdagent-win PATCH V3 03/11] vdagent::handle_max_clipboard fix vd_printf format

Uri Lublin uril at redhat.com
Tue Dec 30 08:20:49 PST 2014


Using unsigned long to print a size_t.
---
 vdagent/vdagent.cpp |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/vdagent/vdagent.cpp b/vdagent/vdagent.cpp
index aa44383..efce981 100644
--- a/vdagent/vdagent.cpp
+++ b/vdagent/vdagent.cpp
@@ -889,8 +889,8 @@ bool VDAgent::handle_display_config(VDAgentDisplayConfig* display_config, uint32
 bool VDAgent::handle_max_clipboard(VDAgentMaxClipboard *msg, uint32_t size)
 {
     if (size != sizeof(VDAgentMaxClipboard)) {
-        vd_printf("VDAgentMaxClipboard: unexpected msg size %u (expected %u)",
-                  size, sizeof(VDAgentMaxClipboard));
+        vd_printf("VDAgentMaxClipboard: unexpected msg size %u (expected %lu)",
+                  size, (unsigned long)sizeof(VDAgentMaxClipboard));
         return false;
     }
     vd_printf("Set max clipboard size: %d", msg->max);
-- 
1.7.1



More information about the Spice-devel mailing list