Skip to content

gmacros: Avoid casting functions

小田喜陽彦 requested to merge akihiko.odaki/glib:macros into main

gmacros.h casts functions to GDestroyNotify, which prevents enabling the following hardening options in applications: -fsanitize=address -fsanitize=cfi-icall (without -fsanitize-cfi-icall-generalize-pointers), and -Wcast-function-type-strict.

Define another inline function that warps the original function into GDestroyNotify.

Signed-off-by: Akihiko Odaki akihiko.odaki@gmail.com

Merge request reports