summaryrefslogtreecommitdiffstats
path: root/python_modules/marshal.py
diff options
context:
space:
mode:
authorFabiano FidĂȘncio <fidencio@redhat.com>2014-09-03 11:51:45 +0200
committerChristophe Fergeau <cfergeau@redhat.com>2014-09-18 13:13:27 +0200
commit9385db68756f6b798e6342993d3acaf3304b363c (patch)
tree251f3c0e46dcb61640c756483b5853cc7531e8a7 /python_modules/marshal.py
parentd45b3e2765ec130d047020d34985e65fa7fb166b (diff)
downloadspice-common-9385db68756f6b798e6342993d3acaf3304b363c.tar.gz
spice-common-9385db68756f6b798e6342993d3acaf3304b363c.tar.xz
spice-common-9385db68756f6b798e6342993d3acaf3304b363c.zip
python: Fix -Wunused-parameter
Although the most part of the parameters marked as unused are actually being used for a few functions, a bunch of warnings can be seen when the code is compiled with "-Wall -Wextra". As adding the unused attribute means that the variable/parameter is meant to be *possibly* unused, we're safe adding it in the generated code, even for used variables/parameters.
Diffstat (limited to 'python_modules/marshal.py')
-rw-r--r--python_modules/marshal.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/python_modules/marshal.py b/python_modules/marshal.py
index ae5fe31..97d02e9 100644
--- a/python_modules/marshal.py
+++ b/python_modules/marshal.py
@@ -353,7 +353,7 @@ def write_message_marshaller(writer, message, is_server, private):
scope = writer.function(function_name,
"static void" if private else "void",
- "SpiceMarshaller *m, %s *msg" % message.c_type() + names_args)
+ "SPICE_GNUC_UNUSED SpiceMarshaller *m, SPICE_GNUC_UNUSED %s *msg" % message.c_type() + names_args)
scope.variable_def("SPICE_GNUC_UNUSED SpiceMarshaller *", "m2")
for n in names: