From 579e01359b389f30d6d017e71ed1308f70653d4e Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Wed, 15 Apr 2020 11:59:36 +0200 Subject: [PATCH] fp-print: Fix sign-compare warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit libfprint/fp-print.c: In function ‘fp_print_equal’: libfprint/fp-print.c:596:21: warning: comparison of integer expressions of different signedness: ‘gint’ {aka ‘int’} and ‘guint’ {aka ‘unsigned int’} [-Wsign-compare] 596 | for (i = 0; i < self->prints->len; i++) | ^ libfprint/fp-print.c: In function ‘fp_print_serialize’: libfprint/fp-print.c:667:21: warning: comparison of integer expressions of different signedness: ‘gint’ {aka ‘int’} and ‘guint’ {aka ‘unsigned int’} [-Wsign-compare] 667 | for (i = 0; i < print->prints->len; i++) | ^ libfprint/fp-print.c: In function ‘fp_print_deserialize’: libfprint/fp-print.c:823:21: warning: comparison of integer expressions of different signedness: ‘gint’ {aka ‘int’} and ‘gsize’ {aka ‘long unsigned int’} [-Wsign-compare] 823 | for (i = 0; i < g_variant_n_children (prints); i++) | ^ --- libfprint/fp-print.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libfprint/fp-print.c b/libfprint/fp-print.c index 6f6c7b0..fd4774f 100644 --- a/libfprint/fp-print.c +++ b/libfprint/fp-print.c @@ -588,7 +588,7 @@ fp_print_equal (FpPrint *self, FpPrint *other) } else if (self->type == FPI_PRINT_NBIS) { - gint i; + guint i; if (self->prints->len != other->prints->len) return FALSE; @@ -661,7 +661,7 @@ fp_print_serialize (FpPrint *print, if (print->type == FPI_PRINT_NBIS) { GVariantBuilder nested = G_VARIANT_BUILDER_INIT (G_VARIANT_TYPE ("(a(aiaiai))")); - gint i; + guint i; g_variant_builder_open (&nested, G_VARIANT_TYPE ("a(aiaiai)")); for (i = 0; i < print->prints->len; i++) @@ -812,7 +812,7 @@ fp_print_deserialize (const guchar *data, if (type == FPI_PRINT_NBIS) { g_autoptr(GVariant) prints = g_variant_get_child_value (print_data, 0); - gint i; + guint i; result = g_object_new (FP_TYPE_PRINT, "driver", driver,