[glib: 7/25] Fixing signedness in glib/goptions.c
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 7/25] Fixing signedness in glib/goptions.c
- Date: Tue, 19 Mar 2019 11:03:26 +0000 (UTC)
commit aef59ca7c87c466085ba79f1310ac992beedc108
Author: Emmanuel Fleury <emmanuel fleury u-bordeaux fr>
Date: Sun Feb 3 19:36:46 2019 +0100
Fixing signedness in glib/goptions.c
glib/goption.c: In function ‘context_has_h_entry’:
glib/goption.c:785:21: error: comparison of integer expressions of different signedness: ‘gsize’ {aka
‘long unsigned int’} and ‘gint’ {aka ‘int’} [-Werror=sign-compare]
for (i = 0; i < context->main_group->n_entries; i++)
^
glib/goption.c:797:21: error: comparison of integer expressions of different signedness: ‘gsize’ {aka
‘long unsigned int’} and ‘gint’ {aka ‘int’} [-Werror=sign-compare]
for (i = 0; i < group->n_entries; i++)
^
glib/goption.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/glib/goption.c b/glib/goption.c
index 83c5eb29e..620595118 100644
--- a/glib/goption.c
+++ b/glib/goption.c
@@ -277,7 +277,7 @@ struct _GOptionGroup
gpointer translate_data;
GOptionEntry *entries;
- gint n_entries;
+ gsize n_entries;
GOptionParseFunc pre_parse_func;
GOptionParseFunc post_parse_func;
@@ -665,7 +665,7 @@ calculate_max_length (GOptionGroup *group,
GHashTable *aliases)
{
GOptionEntry *entry;
- gint i, len, max_length;
+ gsize i, len, max_length;
const gchar *long_name;
max_length = 0;
@@ -828,7 +828,7 @@ g_option_context_get_help (GOptionContext *context,
{
GList *list;
gint max_length = 0, len;
- gint i;
+ gsize i;
GOptionEntry *entry;
GHashTable *shadow_map;
GHashTable *aliases;
@@ -1505,7 +1505,7 @@ parse_short_option (GOptionContext *context,
GError **error,
gboolean *parsed)
{
- gint j;
+ gsize j;
for (j = 0; j < group->n_entries; j++)
{
@@ -1587,7 +1587,7 @@ parse_long_option (GOptionContext *context,
GError **error,
gboolean *parsed)
{
- gint j;
+ gsize j;
for (j = 0; j < group->n_entries; j++)
{
@@ -1698,7 +1698,7 @@ parse_remaining_arg (GOptionContext *context,
GError **error,
gboolean *parsed)
{
- gint j;
+ gsize j;
for (j = 0; j < group->n_entries; j++)
{
@@ -2353,7 +2353,7 @@ void
g_option_group_add_entries (GOptionGroup *group,
const GOptionEntry *entries)
{
- gint i, n_entries;
+ gsize i, n_entries;
g_return_if_fail (entries != NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]