mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-01 05:32:11 +01:00
Silencing cast-function-type warnings
A lot of code cast function pointer to incorrect types. There is no other way but silencing the warning. Follows an example of such cast: glib/glist.c: In function ‘g_list_free_full’: glib/glist.c:223:25: error: cast between incompatible function types from ‘GDestroyNotify’ {aka ‘void (*)(void *)’} to ‘void (*)(void *, void *)’ [-Werror=cast-function-type] g_list_foreach (list, (GFunc) free_func, NULL); ^
This commit is contained in:
parent
4cd8fccc11
commit
5d78256796
@ -355,6 +355,7 @@ if cc.get_id() == 'gcc' or cc.get_id() == 'clang'
|
||||
# Due to pervasive use of things like GPOINTER_TO_UINT(), we do not support
|
||||
# building with -Wbad-function-cast.
|
||||
'-Wno-bad-function-cast',
|
||||
'-Wno-cast-function-type',
|
||||
# Due to function casts through (void*) we cannot support -Wpedantic:
|
||||
# https://wiki.gnome.org/Projects/GLib/CompilerRequirements#Function_pointer_conversions.
|
||||
'-Wno-pedantic',
|
||||
|
Loading…
x
Reference in New Issue
Block a user