diff options
author | Emmanuel Fleury <emmanuel.fleury@u-bordeaux.fr> | 2019-02-04 15:40:37 +0100 |
---|---|---|
committer | Emmanuel Fleury <emmanuel.fleury@u-bordeaux.fr> | 2019-03-17 19:05:34 +0100 |
commit | 357c3db9421a7e4f496e03e2f6aabf9f7054efe5 (patch) | |
tree | ebe19c76500cf4aaeb0bee2734d029790e6d2253 /glib/gvarianttypeinfo.c | |
parent | 3f3a7472b3f7dbf70aef2021589837bb38adc7c0 (diff) | |
download | glib-357c3db9421a7e4f496e03e2f6aabf9f7054efe5.tar.gz |
Fixing various warning in glib/gvarianttypeinfo.c
glib/gvarianttypeinfo.c:115:13: error: missing initializer for field ‘container_class’ of ‘GVariantTypeInfo’ {aka ‘const struct _GVariantTypeInfo’} [-Werror=missing-field-initializers]
/* 'b' */ { fixed_aligned(1) }, /* boolean */
^
glib/gvarianttypeinfo.c:69:10: note: ‘container_class’ declared here
guchar container_class;
^~~~~~~~~~~~~~~
glib/gvarianttypeinfo.c:117:13: error: missing initializer for field ‘container_class’ of ‘GVariantTypeInfo’ {aka ‘const struct _GVariantTypeInfo’} [-Werror=missing-field-initializers]
/* 'd' */ { fixed_aligned(8) }, /* double */
^
glib/gvarianttypeinfo.c:69:10: note: ‘container_class’ declared here
guchar container_class;
^~~~~~~~~~~~~~~
glib/gvarianttypeinfo.c:120:13: error: missing initializer for field ‘container_class’ of ‘GVariantTypeInfo’ {aka ‘const struct _GVariantTypeInfo’} [-Werror=missing-field-initializers]
/* 'g' */ { unaligned }, /* signature string */
^
glib/gvarianttypeinfo.c:69:10: note: ‘container_class’ declared here
guchar container_class;
^~~~~~~~~~~~~~~
glib/gvarianttypeinfo.c:121:13: error: missing initializer for field ‘container_class’ of ‘GVariantTypeInfo’ {aka ‘const struct _GVariantTypeInfo’} [-Werror=missing-field-initializers]
/* 'h' */ { fixed_aligned(4) }, /* file handle (int32) */
^
glib/gvarianttypeinfo.c:69:10: note: ‘container_class’ declared here
guchar container_class;
^~~~~~~~~~~~~~~
glib/gvarianttypeinfo.c:122:13: error: missing initializer for field ‘container_class’ of ‘GVariantTypeInfo’ {aka ‘const struct _GVariantTypeInfo’} [-Werror=missing-field-initializers]
/* 'i' */ { fixed_aligned(4) }, /* int32 */
^
glib/gvarianttypeinfo.c:69:10: note: ‘container_class’ declared here
guchar container_class;
^~~~~~~~~~~~~~~
glib/gvarianttypeinfo.c:127:13: error: missing initializer for field ‘container_class’ of ‘GVariantTypeInfo’ {aka ‘const struct _GVariantTypeInfo’} [-Werror=missing-field-initializers]
/* 'n' */ { fixed_aligned(2) }, /* int16 */
^
glib/gvarianttypeinfo.c:69:10: note: ‘container_class’ declared here
guchar container_class;
^~~~~~~~~~~~~~~
glib/gvarianttypeinfo.c:128:13: error: missing initializer for field ‘container_class’ of ‘GVariantTypeInfo’ {aka ‘const struct _GVariantTypeInfo’} [-Werror=missing-field-initializers]
/* 'o' */ { unaligned }, /* object path string */
^
glib/gvarianttypeinfo.c:69:10: note: ‘container_class’ declared here
guchar container_class;
^~~~~~~~~~~~~~~
glib/gvarianttypeinfo.c:130:13: error: missing initializer for field ‘container_class’ of ‘GVariantTypeInfo’ {aka ‘const struct _GVariantTypeInfo’} [-Werror=missing-field-initializers]
/* 'q' */ { fixed_aligned(2) }, /* uint16 */
^
glib/gvarianttypeinfo.c:69:10: note: ‘container_class’ declared here
guchar container_class;
^~~~~~~~~~~~~~~
glib/gvarianttypeinfo.c:132:13: error: missing initializer for field ‘container_class’ of ‘GVariantTypeInfo’ {aka ‘const struct _GVariantTypeInfo’} [-Werror=missing-field-initializers]
/* 's' */ { unaligned }, /* string */
^
glib/gvarianttypeinfo.c:69:10: note: ‘container_class’ declared here
guchar container_class;
^~~~~~~~~~~~~~~
glib/gvarianttypeinfo.c:133:13: error: missing initializer for field ‘container_class’ of ‘GVariantTypeInfo’ {aka ‘const struct _GVariantTypeInfo’} [-Werror=missing-field-initializers]
/* 't' */ { fixed_aligned(8) }, /* uint64 */
^
glib/gvarianttypeinfo.c:69:10: note: ‘container_class’ declared here
guchar container_class;
^~~~~~~~~~~~~~~
glib/gvarianttypeinfo.c:134:13: error: missing initializer for field ‘container_class’ of ‘GVariantTypeInfo’ {aka ‘const struct _GVariantTypeInfo’} [-Werror=missing-field-initializers]
/* 'u' */ { fixed_aligned(4) }, /* uint32 */
^
glib/gvarianttypeinfo.c:69:10: note: ‘container_class’ declared here
guchar container_class;
^~~~~~~~~~~~~~~
glib/gvarianttypeinfo.c:135:13: error: missing initializer for field ‘container_class’ of ‘GVariantTypeInfo’ {aka ‘const struct _GVariantTypeInfo’} [-Werror=missing-field-initializers]
/* 'v' */ { aligned(8) }, /* variant */
^
glib/gvarianttypeinfo.c:69:10: note: ‘container_class’ declared here
guchar container_class;
^~~~~~~~~~~~~~~
glib/gvarianttypeinfo.c:137:13: error: missing initializer for field ‘container_class’ of ‘GVariantTypeInfo’ {aka ‘const struct _GVariantTypeInfo’} [-Werror=missing-field-initializers]
/* 'x' */ { fixed_aligned(8) }, /* int64 */
^
glib/gvarianttypeinfo.c:69:10: note: ‘container_class’ declared here
guchar container_class;
^~~~~~~~~~~~~~~
glib/gvarianttypeinfo.c:138:13: error: missing initializer for field ‘container_class’ of ‘GVariantTypeInfo’ {aka ‘const struct _GVariantTypeInfo’} [-Werror=missing-field-initializers]
/* 'y' */ { fixed_aligned(1) }, /* byte */
^
glib/gvarianttypeinfo.c:69:10: note: ‘container_class’ declared here
guchar container_class;
^~~~~~~~~~~~~~~
glib/gvarianttypeinfo.c: In function ‘tuple_info_free’:
glib/gvarianttypeinfo.c:368:17: error: comparison of integer expressions of different signedness: ‘gint’ {aka ‘int’} and ‘gsize’ {aka ‘long unsigned int’} [-Werror=sign-compare]
for (i = 0; i < tuple_info->n_members; i++)
^
glib/gvarianttypeinfo.c: In function ‘tuple_set_base_info’:
glib/gvarianttypeinfo.c:641:16: error: comparison of integer expressions of different signedness: ‘gsize’ {aka ‘long unsigned int’} and ‘int’ [-Werror=sign-compare]
if (m->i == -1 && m->type_info->fixed_size)
^~
Diffstat (limited to 'glib/gvarianttypeinfo.c')
-rw-r--r-- | glib/gvarianttypeinfo.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/glib/gvarianttypeinfo.c b/glib/gvarianttypeinfo.c index dc319caee..bed0bb717 100644 --- a/glib/gvarianttypeinfo.c +++ b/glib/gvarianttypeinfo.c @@ -108,10 +108,10 @@ typedef struct /* Hard-code the base types in a constant array */ static const GVariantTypeInfo g_variant_type_info_basic_table[24] = { -#define fixed_aligned(x) x, x - 1 -#define not_a_type 0, -#define unaligned 0, 0 -#define aligned(x) 0, x - 1 +#define fixed_aligned(x) x, x - 1, 0 +#define not_a_type 0, 0, 0 +#define unaligned 0, 0, 0 +#define aligned(x) 0, x - 1, 0 /* 'b' */ { fixed_aligned(1) }, /* boolean */ /* 'c' */ { not_a_type }, /* 'd' */ { fixed_aligned(8) }, /* double */ @@ -362,7 +362,7 @@ static void tuple_info_free (GVariantTypeInfo *info) { TupleInfo *tuple_info; - gint i; + gsize i; g_assert (info->container_class == GV_TUPLE_INFO_CLASS); tuple_info = (TupleInfo *) info; @@ -640,7 +640,7 @@ tuple_set_base_info (TupleInfo *info) * offsets are stored and the last item is fixed-sized too (since * an offset is never stored for the last item). */ - if (m->i == -1 && m->type_info->fixed_size) + if (m->i == (gsize) -1 && m->type_info->fixed_size) /* in that case, the fixed size can be found by finding the * start of the last item (in the usual way) and adding its * fixed size. |