[glib: 5/9] Fix signedness warning in gio/gio-tool.c:attribute_flags_to_string()
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 5/9] Fix signedness warning in gio/gio-tool.c:attribute_flags_to_string()
- Date: Wed, 10 Feb 2021 20:01:09 +0000 (UTC)
commit 85f24921114942cc3f1efcc7270e2929a3a18378
Author: Emmanuel Fleury <emmanuel fleury gmail com>
Date: Tue Nov 17 22:24:39 2020 +0100
Fix signedness warning in gio/gio-tool.c:attribute_flags_to_string()
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));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]