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.
This commit is contained in:
Christoph Reiter 2018-07-29 15:24:59 +02:00
parent ee2ec3343e
commit 7cdf5d0d1d
2 changed files with 2 additions and 2 deletions

View File

@ -1362,7 +1362,7 @@ find_namespace_latest (const gchar *namespace,
*path_ret = elected->path;
*version_ret = elected->version;
g_slice_free (struct NamespaceVersionCandidadate, elected); /* just free the container */
g_slist_foreach (candidates, (GFunc) free_candidate, NULL);
g_slist_foreach (candidates, (GFunc) (void *) free_candidate, NULL);
g_slist_free (candidates);
}
return result;

View File

@ -2455,7 +2455,7 @@ g_typelib_free (GITypelib *typelib)
g_free (typelib->data);
if (typelib->modules)
{
g_list_foreach (typelib->modules, (GFunc) g_module_close, NULL);
g_list_foreach (typelib->modules, (GFunc) (void *) g_module_close, NULL);
g_list_free (typelib->modules);
}
g_slice_free (GITypelib, typelib);