From 85f24921114942cc3f1efcc7270e2929a3a18378 Mon Sep 17 00:00:00 2001 From: Emmanuel Fleury Date: Tue, 17 Nov 2020 22:24:39 +0100 Subject: [PATCH] Fix signedness warning in gio/gio-tool.c:attribute_flags_to_string() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit gio/gio-tool.c: In function ‘attribute_flags_to_string’: gio/gio-tool.c:171:17: error: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ 171 | for (i = 0; i < G_N_ELEMENTS (flag_descr); i++) | ^ --- gio/gio-tool.c | 2 +- gio/gvdb/gvdb-builder.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gio/gio-tool.c b/gio/gio-tool.c index ff82c638e..e60d56751 100644 --- a/gio/gio-tool.c +++ b/gio/gio-tool.c @@ -149,7 +149,7 @@ char * attribute_flags_to_string (GFileAttributeInfoFlags flags) { GString *s; - int i; + gsize i; gboolean first; struct { guint32 mask; diff --git a/gio/gvdb/gvdb-builder.c b/gio/gvdb/gvdb-builder.c index 918ee43fd..64d8201dc 100644 --- a/gio/gvdb/gvdb-builder.c +++ b/gio/gvdb/gvdb-builder.c @@ -463,7 +463,7 @@ static GString * file_builder_serialise (FileBuilder *fb, struct gvdb_pointer root) { - struct gvdb_header header; + struct gvdb_header header = { { 0, 0 }, { 0 }, { 0 }, { { 0 }, { 0 } } }; GString *result; memset (&header, 0, sizeof (header));