gobject: Fix a few more -Wsign-conversion warnings

These are all fairly straightforward, but I didn’t get them locally;
they only showed up on CI.

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

Helps: #3405
This commit is contained in:
Philip Withnall 2025-04-11 23:46:05 +01:00
parent 4ddea1f6c0
commit 96178eb9c0
No known key found for this signature in database
GPG Key ID: C5C42CFB268637CA
3 changed files with 4 additions and 4 deletions

View File

@ -182,7 +182,7 @@ g_bsearch_array_get_index (GBSearchArray *barray,
const GBSearchConfig *bconfig,
gconstpointer node_in_array)
{
guint distance = ((guint8*) node_in_array) - G_BSEARCH_ARRAY_NODES (barray);
size_t distance = (size_t) (((guint8*) node_in_array) - G_BSEARCH_ARRAY_NODES (barray));
g_return_val_if_fail (node_in_array != NULL, barray->n_nodes);

View File

@ -1056,7 +1056,7 @@ signal_parse_name (const gchar *name,
else if (colon[1] == ':')
{
gchar buffer[32];
guint l = colon - name;
size_t l = (size_t) (colon - name);
if (colon[2] == '\0')
return 0;

View File

@ -4600,7 +4600,7 @@ g_type_add_instance_private (GType class_gtype,
* should make the migration fully transparent even if we're effectively
* copying this macro into everybody's code.
*/
return private_size;
return (gint) private_size;
}
/* semi-private function, should only be used by G_DEFINE_TYPE_EXTENDED */
@ -4610,7 +4610,7 @@ g_type_class_adjust_private_offset (gpointer g_class,
{
GType class_gtype = ((GTypeClass *) g_class)->g_type;
TypeNode *node = lookup_type_node_I (class_gtype);
gssize private_size;
size_t private_size;
g_return_if_fail (private_size_or_offset != NULL);