---
 python_modules/demarshal.py |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/python_modules/demarshal.py b/python_modules/demarshal.py
index cbe3599..48551c0 100644
--- a/python_modules/demarshal.py
+++ b/python_modules/demarshal.py
@@ -1047,9 +1047,11 @@ def write_msg_parser(writer, message):
         writer.assign("end", "data + %s" % (msg_sizeof))
         writer.assign("in", "start").newline()
 
-        dest = RootDemarshallingDestination(None, msg_type, msg_sizeof, "data")
-        dest.reuse_scope = parent_scope
-        write_container_parser(writer, message, dest)
+        # avoid defined and assigned but not used warnings of gcc 4.6.0+
+        if message.is_extra_size() or not message.is_fixed_nw_size() or 
message.get_fixed_nw_size() > 0:
+            dest = RootDemarshallingDestination(None, msg_type, msg_sizeof, 
"data")
+            dest.reuse_scope = parent_scope
+            write_container_parser(writer, message, dest)
 
         writer.newline()
         writer.statement("assert(in <= message_end)")
-- 
1.7.3.5

_______________________________________________
Spice-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/spice-devel

Reply via email to