From bd29b0bf65a35a662f6bd67f0eb0816e0e1e4dc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Tue, 16 Jan 2024 02:09:10 +0100 Subject: [PATCH] gtypelib: Use size_t for size-related arguments --- girepository/gitypelib.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/girepository/gitypelib.c b/girepository/gitypelib.c index 868b68982..8d56836cb 100644 --- a/girepository/gitypelib.c +++ b/girepository/gitypelib.c @@ -742,11 +742,10 @@ validate_param_type_blob (GITypelib *typelib, uint32_t offset, uint32_t signature_offset, gboolean return_type, - unsigned int n_params, + size_t n_params, GError **error) { ParamTypeBlob *blob; - unsigned int i; blob = (ParamTypeBlob*)&typelib->data[offset]; @@ -768,7 +767,7 @@ validate_param_type_blob (GITypelib *typelib, return FALSE; } - for (i = 0; i < n_params; i++) + for (size_t i = 0; i < n_params; i++) { if (!validate_type_blob (typelib, offset + sizeof (ParamTypeBlob) + @@ -1147,7 +1146,7 @@ validate_constant_blob (GITypelib *typelib, uint32_t offset, GError **error) { - unsigned int value_size[] = { + size_t value_size[] = { 0, /* VOID */ 4, /* BOOLEAN */ 1, /* INT8 */