summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2018-03-10 15:33:06 +0000
committerEmmanuele Bassi <ebassi@gnome.org>2018-03-10 16:02:44 +0000
commit334877eccf62fde389c9dedd6a751bcdb4345f15 (patch)
treebdf06f323ce358dd11bf279e2414692ae14b8775
parent6a8e1b8ad69e5ec4609295e8bf72547d70836871 (diff)
downloadgobject-introspection-334877eccf62fde389c9dedd6a751bcdb4345f15.tar.gz
Annotate possibly unused variable
When using the NEW_CLASS macro, we're also declaring a static constant that we might end up using later. GCC will complain if we're not using the declared variable, so we should annotate it with G_GNUC_UNUSED. If we end up using the variable, the compiler will ignore the annotation; if we don't, we won't be getting a compiler warning when we don't use it.
-rw-r--r--giscanner/giscannermodule.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/giscanner/giscannermodule.c b/giscanner/giscannermodule.c
index 77de82d6..9148960f 100644
--- a/giscanner/giscannermodule.c
+++ b/giscanner/giscannermodule.c
@@ -56,7 +56,7 @@
_GI_EXTERN MOD_INIT(_giscanner);
#define NEW_CLASS(ctype, name, cname, num_methods) \
-static const PyMethodDef _Py##cname##_methods[num_methods]; \
+static const PyMethodDef _Py##cname##_methods[num_methods] G_GNUC_UNUSED; \
PyTypeObject Py##cname##_Type = { \
PyVarObject_HEAD_INIT(NULL, 0) \
"scanner." name, \