[Spice-devel] [PATCH spice-common] silence -Wunused-parameter

Pavel Grunt pgrunt at redhat.com
Tue Nov 1 13:13:22 UTC 2016


---
 common/log.c                | 2 +-
 python_modules/demarshal.py | 2 +-
 tests/test-logging.c        | 2 +-
 tests/test-marshallers.c    | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/common/log.c b/common/log.c
index 20d4597..28f518b 100644
--- a/common/log.c
+++ b/common/log.c
@@ -121,7 +121,7 @@ static void spice_log_set_abort_level(void)
 static void spice_logger(const gchar *log_domain,
                          GLogLevelFlags log_level,
                          const gchar *message,
-                         gpointer user_data)
+                         gpointer user_data G_GNUC_UNUSED)
 {
     if (glib_debug_level != 0) {
         if ((log_level & G_LOG_LEVEL_MASK) > glib_debug_level)
diff --git a/python_modules/demarshal.py b/python_modules/demarshal.py
index de2ccd0..1ea131d 100644
--- a/python_modules/demarshal.py
+++ b/python_modules/demarshal.py
@@ -72,7 +72,7 @@ def write_parser_helpers(writer):
             writer.statement("return val")
             writer.end_block()
 
-    writer.function("SPICE_GNUC_UNUSED consume_fd", "int", "uint8_t **ptr", True)
+    writer.function("SPICE_GNUC_UNUSED consume_fd", "int", "uint8_t **ptr SPICE_GNUC_UNUSED", True)
     writer.statement("return -1")
     writer.end_block()
 
diff --git a/tests/test-logging.c b/tests/test-logging.c
index 1ae4e00..f1ad1b6 100644
--- a/tests/test-logging.c
+++ b/tests/test-logging.c
@@ -364,7 +364,7 @@ static void test_spice_g_messages_debug_all(void)
 }
 #endif /* GLIB_CHECK_VERSION(2,38,0) */
 
-static void handle_sigabrt(int sig)
+static void handle_sigabrt(int sig G_GNUC_UNUSED)
 {
     _Exit(1);
 }
diff --git a/tests/test-marshallers.c b/tests/test-marshallers.c
index 0026b61..734a2bb 100644
--- a/tests/test-marshallers.c
+++ b/tests/test-marshallers.c
@@ -14,7 +14,7 @@ static uint8_t expected_data[] = { 0x02, 0x00, 0x00, 0x00, /* data_size */
                                    0xef, 0xcd, 0xab, 0x90, 0x78, 0x56, 0x34, 0x12, /* data */
 };
 
-int main(int argc, char **argv)
+int main(int argc G_GNUC_UNUSED, char **argv G_GNUC_UNUSED)
 {
     SpiceMarshaller *marshaller;
     SpiceMsgMainShortDataSubMarshall *msg;
-- 
2.10.1



More information about the Spice-devel mailing list