From f6e234fdb6bc04f972c0573bd272f25b47833d26 Mon Sep 17 00:00:00 2001 From: Emmanuel Fleury Date: Mon, 16 Nov 2020 16:07:36 +0100 Subject: [PATCH 1/6] Fix signedness warning in gobject/gtype.c:lookup_iface_entry_I() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit gobject/gtype.c: In function ‘lookup_iface_entry_I’: gobject/gtype.c:599:17: error: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ 599 | if (index < IFACE_ENTRIES_N_ENTRIES (entries)) | ^ gobject/gatomicarray.h:51:8: note: in definition of macro ‘G_ATOMIC_ARRAY_DO_TRANSACTION’ 51 | {_C_;} \ | ^~~ --- gobject/gtype.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gobject/gtype.c b/gobject/gtype.c index 909faf138b..150403719c 100644 --- a/gobject/gtype.c +++ b/gobject/gtype.c @@ -575,7 +575,7 @@ lookup_iface_entry_I (IFaceEntries *entries, guint8 *offsets; guint offset_index; IFaceEntry *check; - int index; + gsize index; IFaceEntry *entry; if (entries == NULL) -- GitLab From 6b0552bb893cee6dc833225a311ca78e65e6f440 Mon Sep 17 00:00:00 2001 From: Emmanuel Fleury Date: Mon, 16 Nov 2020 16:23:15 +0100 Subject: [PATCH 2/6] Fix signedness warning in gobject/gtype.c:type_node_add_iface_entry_W() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit gobject/gtype.c: In function ‘type_node_add_iface_entry_W’: gobject/gtype.c:1379:21: error: comparison of integer expressions of different signedness: ‘guint’ {aka ‘unsigned int’} and ‘int’ 1379 | for (i = 0; i < num_entries; i++) | ^ --- gobject/gtype.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gobject/gtype.c b/gobject/gtype.c index 150403719c..73f8e74505 100644 --- a/gobject/gtype.c +++ b/gobject/gtype.c @@ -1365,7 +1365,7 @@ type_node_add_iface_entry_W (TypeNode *node, IFaceEntry *entry; TypeNode *iface_node; guint i, j; - int num_entries; + guint num_entries; g_assert (node->is_instantiatable); -- GitLab From e28d9defb156177a3814c795a018e30de1bbe712 Mon Sep 17 00:00:00 2001 From: Emmanuel Fleury Date: Mon, 16 Nov 2020 16:36:50 +0100 Subject: [PATCH 3/6] Fix signedness warning in gobject/gtype.c:g_type_interface_add_prerequisite() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit gobject/gtype.c: In function ‘g_type_interface_add_prerequisite’: gobject/gtype.c:1607:21: error: comparison of integer expressions of different signedness: ‘guint’ {aka ‘unsigned int’} and ‘int’ 1607 | for (i = 0; i < prerequisite_node->n_supers + 1; i++) | ^ --- gobject/gtype.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gobject/gtype.c b/gobject/gtype.c index 73f8e74505..1308632bf9 100644 --- a/gobject/gtype.c +++ b/gobject/gtype.c @@ -1604,7 +1604,7 @@ g_type_interface_add_prerequisite (GType interface_type, } } - for (i = 0; i < prerequisite_node->n_supers + 1; i++) + for (i = 0; i < prerequisite_node->n_supers + 1u; i++) type_iface_add_prerequisite_W (iface, lookup_type_node_I (prerequisite_node->supers[i])); G_WRITE_UNLOCK (&type_rw_lock); } -- GitLab From d50d2098b5649d1deacbf8464b1dc7a581f7217e Mon Sep 17 00:00:00 2001 From: Emmanuel Fleury Date: Mon, 16 Nov 2020 16:40:39 +0100 Subject: [PATCH 4/6] Fix signedness warning in gobject/gobject.c:g_object_class_install_properties() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit gobject/gobject.c: In function ‘g_object_class_install_properties’: gobject/gobject.c:766:17: error: comparison of integer expressions of different signedness: ‘gint’ {aka ‘int’} and ‘guint’ {aka ‘unsigned int’} 766 | for (i = 1; i < n_pspecs; i++) | ^ --- gobject/gobject.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gobject/gobject.c b/gobject/gobject.c index a3a32be9fd..df67abdb67 100644 --- a/gobject/gobject.c +++ b/gobject/gobject.c @@ -749,7 +749,7 @@ g_object_class_install_properties (GObjectClass *oclass, GParamSpec **pspecs) { GType oclass_type, parent_type; - gint i; + guint i; g_return_if_fail (G_IS_OBJECT_CLASS (oclass)); g_return_if_fail (n_pspecs > 1); -- GitLab From 7753a0492b00e72af9ae6fe3998d4c9e3dfbec48 Mon Sep 17 00:00:00 2001 From: Emmanuel Fleury Date: Mon, 16 Nov 2020 16:43:56 +0100 Subject: [PATCH 5/6] Fix signedness warnings in gobject/gobject.c:g_object_new_with_custom_constructor() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit gobject/gobject.c: In function ‘g_object_new_with_custom_constructor’: gobject/gobject.c:1836:21: error: comparison of integer expressions of different signedness: ‘gint’ {aka ‘int’} and ‘guint’ {aka ‘unsigned int’} 1836 | for (j = 0; j < n_params; j++) | ^ gobject/gobject.c:1914:17: error: comparison of integer expressions of different signedness: ‘gint’ {aka ‘int’} and ‘guint’ {aka ‘unsigned int’} 1914 | for (i = 0; i < n_params; i++) | ^ --- gobject/gobject.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gobject/gobject.c b/gobject/gobject.c index df67abdb67..36dd2e9401 100644 --- a/gobject/gobject.c +++ b/gobject/gobject.c @@ -1798,7 +1798,7 @@ g_object_new_with_custom_constructor (GObjectClass *class, gint n_cparams; gint cvals_used; GSList *node; - gint i; + guint i; /* If we have ->constructed() then we have to do a lot more work. * It's possible that this is a singleton and it's also possible @@ -1828,7 +1828,7 @@ g_object_new_with_custom_constructor (GObjectClass *class, { GParamSpec *pspec; GValue *value; - gint j; + guint j; pspec = node->data; value = NULL; /* to silence gcc... */ -- GitLab From 236d6281b829a1c2f71a90915c6c1c2a3edd68a5 Mon Sep 17 00:00:00 2001 From: Emmanuel Fleury Date: Mon, 16 Nov 2020 16:50:52 +0100 Subject: [PATCH 6/6] Fix signedness warnings in gobject/gobject.c:g_object_new_internal() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit gobject/gobject.c: In function ‘g_object_new_internal’: gobject/gobject.c:1962:25: error: comparison of integer expressions of different signedness: ‘gint’ {aka ‘int’} and ‘guint’ {aka ‘unsigned int’} 1962 | for (j = 0; j < n_params; j++) | ^ gobject/gobject.c:1989:21: error: comparison of integer expressions of different signedness: ‘gint’ {aka ‘int’} and ‘guint’ {aka ‘unsigned int’} 1989 | for (i = 0; i < n_params; i++) | ^ --- gobject/gobject.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gobject/gobject.c b/gobject/gobject.c index 36dd2e9401..056d5c5899 100644 --- a/gobject/gobject.c +++ b/gobject/gobject.c @@ -1954,7 +1954,7 @@ g_object_new_internal (GObjectClass *class, { const GValue *value; GParamSpec *pspec; - gint j; + guint j; pspec = node->data; value = NULL; /* to silence gcc... */ @@ -1980,7 +1980,7 @@ g_object_new_internal (GObjectClass *class, if (nqueue) { - gint i; + guint i; /* Set remaining properties. The construct properties will * already have been taken, so set only the non-construct -- GitLab