summaryrefslogtreecommitdiff
path: root/giscanner
diff options
context:
space:
mode:
authorChristoph Reiter <reiter.christoph@gmail.com>2018-07-29 15:24:59 +0200
committerChristoph Reiter <reiter.christoph@gmail.com>2018-07-29 18:56:58 +0200
commit54e8b9b96e4553b4a05e95612d0a91677e85f9e8 (patch)
tree94cd99b3f91321b55bf33d015441efcf7e0fc55c /giscanner
parent769f7602dc5762fe1df3c44a0dd2f2b2fcc39dd8 (diff)
downloadgobject-introspection-54e8b9b96e4553b4a05e95612d0a91677e85f9e8.tar.gz
build: enable -Wcast-function-type
Where it's easy add dummy args to match the cast; where the target is a subset just prevent the warning with a cast to void*. Provide a real copy function for the boxed type code in regress_foo. This code is never executed afaics, but why not.
Diffstat (limited to 'giscanner')
-rw-r--r--giscanner/giscannermodule.c4
-rw-r--r--giscanner/sourcescanner.c6
2 files changed, 5 insertions, 5 deletions
diff --git a/giscanner/giscannermodule.c b/giscanner/giscannermodule.c
index 2a735978..a024f1a0 100644
--- a/giscanner/giscannermodule.c
+++ b/giscanner/giscannermodule.c
@@ -495,7 +495,7 @@ pygi_source_scanner_set_macro_scan (PyGISourceScanner *self,
}
static PyObject *
-pygi_source_scanner_get_symbols (PyGISourceScanner *self)
+pygi_source_scanner_get_symbols (PyGISourceScanner *self, G_GNUC_UNUSED PyObject *unused)
{
GSList *l, *symbols;
PyObject *list;
@@ -516,7 +516,7 @@ pygi_source_scanner_get_symbols (PyGISourceScanner *self)
}
static PyObject *
-pygi_source_scanner_get_comments (PyGISourceScanner *self)
+pygi_source_scanner_get_comments (PyGISourceScanner *self, G_GNUC_UNUSED PyObject *unused)
{
GSList *l, *comments;
PyObject *list;
diff --git a/giscanner/sourcescanner.c b/giscanner/sourcescanner.c
index 8c400171..464e4695 100644
--- a/giscanner/sourcescanner.c
+++ b/giscanner/sourcescanner.c
@@ -39,7 +39,7 @@ void
ctype_free (GISourceType * type)
{
g_free (type->name);
- g_list_foreach (type->child_list, (GFunc)gi_source_symbol_unref, NULL);
+ g_list_foreach (type->child_list, (GFunc)(void *)gi_source_symbol_unref, NULL);
g_list_free (type->child_list);
g_slice_free (GISourceType, type);
}
@@ -242,9 +242,9 @@ gi_source_scanner_free (GISourceScanner *scanner)
g_hash_table_destroy (scanner->typedef_table);
g_hash_table_destroy (scanner->const_table);
- g_slist_foreach (scanner->comments, (GFunc)gi_source_comment_free, NULL);
+ g_slist_foreach (scanner->comments, (GFunc)(void *)gi_source_comment_free, NULL);
g_slist_free (scanner->comments);
- g_slist_foreach (scanner->symbols, (GFunc)gi_source_symbol_unref, NULL);
+ g_slist_foreach (scanner->symbols, (GFunc)(void *)gi_source_symbol_unref, NULL);
g_slist_free (scanner->symbols);
g_hash_table_unref (scanner->files);