gobject: Cast various inverted bitfield constants to unsigned

This fixes `-Wsign-conversion` warnings, though I’m not sure why the
compiler is emitting them. The signed/unsigned status of flag enum
members is not particularly well defined in the C standard (and even
less well understood by me), so just do what seems necessary to shut the
compiler up.

The benefits of enabling `-Wsign-conversion` across the codebase
hopefully outweighs this noise.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>

Helps: #3405
This commit is contained in:
Philip Withnall
2025-04-11 15:08:16 +01:00
parent 70ddc35340
commit 633e49c8d1
6 changed files with 16 additions and 16 deletions

View File

@@ -54,7 +54,7 @@
/* --- defines --- */
#define PARAM_FLOATING_FLAG 0x2
#define G_PARAM_USER_MASK (~0U << G_PARAM_USER_SHIFT)
#define G_PARAM_USER_MASK ((GParamFlags) (~0U << G_PARAM_USER_SHIFT))
#define PSPEC_APPLIES_TO_VALUE(pspec, value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_PARAM_SPEC_VALUE_TYPE (pspec)))
/* --- prototypes --- */