-
g_steal_pointer is both an inline function, returning gpointer, and a macro that casts the return value to the type of its argument. The first version of the macro uses '0 ? (*(pp)) : (g_steal_pointer) (pp)' to cast the return value to the type of *pp, but this fails to yield warnings about incompatible pointer types with current gcc. Apparently the ternary operator is optimized away before the type of the expression is determined. The typeof() (or __typeof__()) operator allows an explicit cast. https://bugzilla.gnome.org/show_bug.cgi?id=742456 https://bugzilla.gnome.org/show_bug.cgi?id=796341
1a6be022