glib: Fix strict-aliasing warnings with g_clear_pointer()
glib: Fix strict-aliasing warnings with g_clear_pointer()

gpointer* cannot be aliased with arbitrary types. In order to fix
-Wstrict-aliasing=2 warnings with the g_clear_pointer() macro, we need
to cast through char*, which is allowed to alias with anything.

Even if we don’t make GLib strict-aliasing safe, it’s important to
ensure this macro is safe, since it could be used from projects which do
compile with -fstrict-aliasing.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://bugzilla.gnome.org/show_bug.cgi?id=791622

johne53/MB3Glib,endlessm/glib,johne53/MB3Glib,johne53/MB3Glib,endlessm/glib,johne53/MB3Glib,johne53/MB3Glib,endlessm/glib,endlessm/glib,johne53/MB3Glib,endlessm/glib