girnode: Make an internal struct member’s type more specific

This struct is only ever heap allocated, and enums are always the same
size as an int (or unsigned int), so it won’t change size.
The struct doesn’t correspond to any mmapped structure from a
typelib file.

This should fix some `-Wsign-conversion` warnings (curiously only seen
on the macOS CI runner) by using the most specific type.

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

Helps: #3405
This commit is contained in:
Philip Withnall
2025-04-22 23:50:59 +01:00
parent 0dbdce17dd
commit e662421d3a
3 changed files with 3 additions and 3 deletions

View File

@@ -147,7 +147,7 @@ struct _GIIrNodeType
uint8_t is_ghashtable : 1; uint8_t is_ghashtable : 1;
uint8_t is_interface : 1; uint8_t is_interface : 1;
uint8_t is_error : 1; uint8_t is_error : 1;
int tag; GITypeTag tag;
char *unparsed; /* (owned) */ char *unparsed; /* (owned) */

View File

@@ -499,7 +499,7 @@ static IntegerAliasInfo integer_aliases[] = {
typedef struct { typedef struct {
const char *str; const char *str;
int tag; GITypeTag tag;
gboolean pointer; gboolean pointer;
} BasicTypeInfo; } BasicTypeInfo;

View File

@@ -221,7 +221,7 @@ write_type_info (const char *ns,
GITypeInfo *info, GITypeInfo *info,
Xml *file) Xml *file)
{ {
int tag; GITypeTag tag;
GITypeInfo *type; GITypeInfo *type;
gboolean is_pointer; gboolean is_pointer;