gclosure: Fix two -Wsign-conversion warnings on macOS

These don’t show up for me on Linux, but are now causing CI failures on
macOS (https://gitlab.gnome.org/GNOME/glib/-/jobs/5006543):
```
../gobject/gclosure.c:923:40: error: implicit conversion changes signedness: 'gboolean' (aka 'int') to 'guint' (aka 'unsigned int') [-Werror,-Wsign-conversion]
      ATOMIC_SET (closure, in_marshal, in_marshal);
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
```

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
This commit is contained in:
Philip Withnall
2025-04-22 22:55:41 +01:00
parent 9f11c8962b
commit 4e54b46ce9

View File

@@ -920,7 +920,7 @@ g_closure_invoke (GClosure *closure,
marshal_data);
if (!in_marshal)
closure_invoke_notifiers (closure, POST_NOTIFY);
ATOMIC_SET (closure, in_marshal, in_marshal);
ATOMIC_SET (closure, in_marshal, (guint) in_marshal);
}
g_closure_unref (closure);
}
@@ -984,7 +984,7 @@ _g_closure_invoke_va (GClosure *closure,
n_params, param_types);
if (!in_marshal)
closure_invoke_notifiers (closure, POST_NOTIFY);
ATOMIC_SET (closure, in_marshal, in_marshal);
ATOMIC_SET (closure, in_marshal, (guint) in_marshal);
}
g_closure_unref (closure);
}