mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-01 06:33:41 +02:00
gobject: Make g_clear_object take a non-volatile GObject **
The implementation is silently discarding this anyway, and g_object_unref() is using atomic operations. So this should be safe. Having this here triggers -Wdiscarded-qualifiers when g_clear_pointer() is fixed to use __typeof__().
This commit is contained in:
@@ -132,7 +132,7 @@ test_clear (void)
|
||||
static void
|
||||
test_clear_function (void)
|
||||
{
|
||||
volatile GObject *o = NULL;
|
||||
GObject *o = NULL;
|
||||
GObject *tmp;
|
||||
|
||||
(g_clear_object) (&o);
|
||||
|
Reference in New Issue
Block a user