mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-10-01 03:16:38 +02:00
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:
@@ -948,7 +948,7 @@ g_object_base_class_init (GObjectClass *class)
|
||||
GObjectClass *pclass = g_type_class_peek_parent (class);
|
||||
|
||||
/* Don't inherit HAS_DERIVED_CLASS flag from parent class */
|
||||
class->flags &= ~CLASS_HAS_DERIVED_CLASS_FLAG;
|
||||
class->flags &= (unsigned) ~CLASS_HAS_DERIVED_CLASS_FLAG;
|
||||
|
||||
if (pclass)
|
||||
pclass->flags |= CLASS_HAS_DERIVED_CLASS_FLAG;
|
||||
|
Reference in New Issue
Block a user