[Spice-devel] [PATCH 10/20] mingw: workaround "use of unitialized var" warning

Christophe Fergeau cfergeau at redhat.com
Thu Mar 1 02:17:44 PST 2012


mingw warns about using a variable before it's initialized, but
it's a false alarm. Initialize it to 0 to avoid the warning.
---
 vdagent/vdagent.cpp |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/vdagent/vdagent.cpp b/vdagent/vdagent.cpp
index 3f56292..06c701d 100644
--- a/vdagent/vdagent.cpp
+++ b/vdagent/vdagent.cpp
@@ -976,7 +976,7 @@ bool VDAgent::handle_clipboard_request(VDAgentClipboardRequest* clipboard_reques
     HANDLE clip_data;
     uint8_t* new_data = NULL;
     long new_size;
-    size_t len;
+    size_t len = 0;
     CxImage image;
 
     if (_clipboard_owner != owner_guest) {
-- 
1.7.7.6



More information about the Spice-devel mailing list