From e662421d3ae247d61ed714cd5182c91ef54a73b3 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Tue, 22 Apr 2025 23:50:59 +0100 Subject: [PATCH] =?UTF-8?q?girnode:=20Make=20an=20internal=20struct=20memb?= =?UTF-8?q?er=E2=80=99s=20type=20more=20specific?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Helps: #3405 --- girepository/girnode-private.h | 2 +- girepository/girparser.c | 2 +- girepository/girwriter.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/girepository/girnode-private.h b/girepository/girnode-private.h index 6bb814e38..171d38a50 100644 --- a/girepository/girnode-private.h +++ b/girepository/girnode-private.h @@ -147,7 +147,7 @@ struct _GIIrNodeType uint8_t is_ghashtable : 1; uint8_t is_interface : 1; uint8_t is_error : 1; - int tag; + GITypeTag tag; char *unparsed; /* (owned) */ diff --git a/girepository/girparser.c b/girepository/girparser.c index 52e6a92fa..e6f78b76f 100644 --- a/girepository/girparser.c +++ b/girepository/girparser.c @@ -499,7 +499,7 @@ static IntegerAliasInfo integer_aliases[] = { typedef struct { const char *str; - int tag; + GITypeTag tag; gboolean pointer; } BasicTypeInfo; diff --git a/girepository/girwriter.c b/girepository/girwriter.c index 82db11774..b2bd6395d 100644 --- a/girepository/girwriter.c +++ b/girepository/girwriter.c @@ -221,7 +221,7 @@ write_type_info (const char *ns, GITypeInfo *info, Xml *file) { - int tag; + GITypeTag tag; GITypeInfo *type; gboolean is_pointer;