[epiphany] Enable and placate -Wsign-compare



commit 00b134d0f5736650d98ed61b75dc3ff62459da18
Author: Michael Catanzaro <mcatanzaro igalia com>
Date:   Sat Dec 26 21:58:27 2015 -0600

    Enable and placate -Wsign-compare

 configure.ac                             |    2 +-
 embed/ephy-about-handler.c               |    2 +-
 embed/ephy-embed-prefs.c                 |    2 +-
 embed/ephy-encodings.c                   |    2 +-
 embed/web-extension/ephy-web-extension.c |    2 +-
 lib/ephy-file-helpers.c                  |    2 +-
 lib/ephy-initial-state.c                 |    2 +-
 lib/ephy-langs.c                         |    4 ++--
 lib/ephy-node-db.c                       |    2 +-
 lib/ephy-node-filter.c                   |    6 +++---
 lib/ephy-node.c                          |   10 +++++-----
 lib/ephy-profile-migrator.c              |    2 +-
 lib/ephy-string.c                        |    4 ++--
 lib/ephy-web-dom-utils.c                 |    4 ++--
 lib/widgets/ephy-location-entry.c        |    2 +-
 lib/widgets/ephy-node-view.c             |    2 +-
 lib/widgets/ephy-zoom-action.c           |    2 +-
 src/bookmarks/ephy-bookmarks-editor.c    |    9 +++++----
 src/bookmarks/ephy-bookmarks-export.c    |    5 +++--
 src/bookmarks/ephy-bookmarks.c           |   18 +++++++++---------
 src/bookmarks/ephy-topic-action-group.c  |    2 +-
 src/bookmarks/ephy-topics-entry.c        |    3 ++-
 src/bookmarks/ephy-topics-palette.c      |    5 +++--
 src/ephy-completion-model.c              |    2 +-
 src/ephy-location-controller.c           |    2 +-
 src/ephy-window.c                        |    8 ++++----
 src/prefs-dialog.c                       |    6 +++---
 src/window-commands.c                    |    4 ++--
 tests/ephy-bookmarks-test.c              |    2 +-
 tests/ephy-embed-utils-test.c            |    2 +-
 tests/ephy-file-helpers-test.c           |    6 +++---
 tests/ephy-string-test.c                 |    2 +-
 tests/ephy-web-view-test.c               |    4 ++--
 33 files changed, 68 insertions(+), 64 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index f20bb9c..12b1338 100644
--- a/configure.ac
+++ b/configure.ac
@@ -37,7 +37,7 @@ AX_COMPILER_FLAGS([WARN_CFLAGS], [WARN_LDFLAGS], [$ax_is_release], [-Wdeclaratio
        dnl TODO: Remove all of these! These warnings should be fixed, not
        dnl silenced. At least, for the most part. -Wswitch-enum really does
        dnl seem pretty dumb.
-       [-Wno-deprecated-declarations -Wno-switch-enum -Wno-switch-default -Wno-sign-compare])
+       [-Wno-deprecated-declarations -Wno-switch-enum -Wno-switch-default])
 
 AC_PROG_CC
 
diff --git a/embed/ephy-about-handler.c b/embed/ephy-about-handler.c
index b4b2d79..5b7db3d 100644
--- a/embed/ephy-about-handler.c
+++ b/embed/ephy-about-handler.c
@@ -85,7 +85,7 @@ ephy_about_handler_finish_request (WebKitURISchemeRequest *request,
 {
   GInputStream *stream;
 
-  data_length = data_length != -1 ? data_length : strlen (data);
+  data_length = data_length != -1 ? data_length : (gssize)strlen (data);
   stream = g_memory_input_stream_new_from_data (data, data_length, g_free);
   webkit_uri_scheme_request_finish (request, stream, data_length, "text/html");
   g_object_unref (stream);
diff --git a/embed/ephy-embed-prefs.c b/embed/ephy-embed-prefs.c
index e63b200..8dc1e84 100644
--- a/embed/ephy-embed-prefs.c
+++ b/embed/ephy-embed-prefs.c
@@ -544,7 +544,7 @@ static gpointer
 ephy_embed_prefs_init (gpointer user_data)
 {
   GtkSettings *gtk_settings;
-  int i;
+  guint i;
 
   webkit_settings = webkit_settings_new_with_settings ("enable-developer-extras", TRUE,
                                                        "enable-fullscreen", TRUE,
diff --git a/embed/ephy-encodings.c b/embed/ephy-encodings.c
index 93595c1..faac080 100644
--- a/embed/ephy-encodings.c
+++ b/embed/ephy-encodings.c
@@ -350,7 +350,7 @@ static void
 ephy_encodings_init (EphyEncodings *encodings)
 {
   char **list;
-  int i;
+  guint i;
 
   LOG ("EphyEncodings initialising");
 
diff --git a/embed/web-extension/ephy-web-extension.c b/embed/web-extension/ephy-web-extension.c
index e63416d..672b803 100644
--- a/embed/web-extension/ephy-web-extension.c
+++ b/embed/web-extension/ephy-web-extension.c
@@ -910,7 +910,7 @@ web_page_document_loaded (WebKitWebPage *web_page,
   WebKitDOMHTMLCollection *forms = NULL;
   WebKitDOMDocument *document = NULL;
   gulong forms_n;
-  int i;
+  guint i;
 
   if (!extension->form_auth_data_cache ||
       !g_settings_get_boolean (EPHY_SETTINGS_MAIN, EPHY_PREFS_REMEMBER_PASSWORDS))
diff --git a/lib/ephy-file-helpers.c b/lib/ephy-file-helpers.c
index a2654c1..5050ff6 100644
--- a/lib/ephy-file-helpers.c
+++ b/lib/ephy-file-helpers.c
@@ -359,7 +359,7 @@ ephy_file_helpers_init (const char *profile_dir,
 
        if (steal_data_from_profile && profile_dir)
        {
-               int i;
+               guint i;
                const char *files_to_copy[] = { EPHY_HISTORY_FILE, EPHY_BOOKMARKS_FILE };
                
                for (i = 0; i < G_N_ELEMENTS (files_to_copy); i++)
diff --git a/lib/ephy-initial-state.c b/lib/ephy-initial-state.c
index e370319..99cbb38 100644
--- a/lib/ephy-initial-state.c
+++ b/lib/ephy-initial-state.c
@@ -74,7 +74,7 @@ find_by_name (const char *name)
 {
   EphyNode *result = NULL;
   GPtrArray *children;
-  int i;
+  guint i;
 
   children = ephy_node_get_children (states);
   for (i = 0; i < children->len; i++) {
diff --git a/lib/ephy-langs.c b/lib/ephy-langs.c
index 1651f4f..cae80de 100644
--- a/lib/ephy-langs.c
+++ b/lib/ephy-langs.c
@@ -37,7 +37,7 @@ ephy_langs_sanitise (GArray *array)
        int i, j;
 
        /* if we have 'xy-ab' in list but not 'xy', append 'xy' */
-       for (i = 0; i < array->len; i++)
+       for (i = 0; i < (int) array->len; i++)
        {
                gboolean found = FALSE;
                char *dash, *prefix;
@@ -47,7 +47,7 @@ ephy_langs_sanitise (GArray *array)
                dash = strchr (lang1, '-');
                if (dash == NULL) continue;
 
-               for (j = i + 1; j < array->len; j++)
+               for (j = i + 1; j < (int) array->len; j++)
                {
                        lang2 = (char *) g_array_index (array, char *, j);
                        if (strchr (lang2, '-') == NULL &&
diff --git a/lib/ephy-node-db.c b/lib/ephy-node-db.c
index 5c02a37..44c45bf 100644
--- a/lib/ephy-node-db.c
+++ b/lib/ephy-node-db.c
@@ -406,7 +406,7 @@ ephy_node_db_write_to_xml_valist (EphyNodeDb *db,
                GPtrArray *children;
                EphyNodeFilterFunc filter;
                gpointer user_data;
-               int i;
+               guint i;
 
                filter = va_arg (argptr, EphyNodeFilterFunc);
                user_data = va_arg (argptr, gpointer);
diff --git a/lib/ephy-node-filter.c b/lib/ephy-node-filter.c
index e802164..a7cee39 100644
--- a/lib/ephy-node-filter.c
+++ b/lib/ephy-node-filter.c
@@ -154,7 +154,7 @@ ephy_node_filter_add_expression (EphyNodeFilter *filter,
                                 EphyNodeFilterExpression *exp,
                                 int level)
 {
-       while (level >= filter->priv->levels->len)
+       while (level >= (int)filter->priv->levels->len)
                g_ptr_array_add (filter->priv->levels, NULL);
 
        /* FIXME bogosity! This only works because g_list_append (x, data) == x */
@@ -204,7 +204,7 @@ gboolean
 ephy_node_filter_evaluate (EphyNodeFilter *filter,
                           EphyNode *node)
 {
-       int i;
+       guint i;
 
        for (i = 0; i < filter->priv->levels->len; i++) {
                GList *l, *list;
@@ -336,7 +336,7 @@ ephy_node_filter_expression_evaluate (EphyNodeFilterExpression *exp,
        {
                EphyNode *prop;
                GPtrArray *children;
-               int i;
+               guint i;
                
                children = ephy_node_get_children (node);
                for (i = 0; i < children->len; i++)
diff --git a/lib/ephy-node.c b/lib/ephy-node.c
index 206f879..8f02e1d 100644
--- a/lib/ephy-node.c
+++ b/lib/ephy-node.c
@@ -191,7 +191,7 @@ ephy_node_emit_signal (EphyNode *node, EphyNodeSignalType type, ...)
 
        if (G_UNLIKELY (--node->emissions == 0 && node->invalidated_signals))
        {
-               int removed;
+               guint removed;
 
                removed = g_hash_table_foreach_remove
                                (node->signals,
@@ -1153,7 +1153,7 @@ ephy_node_sort_children (EphyNode *node,
                         GCompareFunc compare_func)
 {
        GPtrArray *newkids;
-       int i, *new_order;
+       guint i, *new_order;
 
        if (ephy_node_db_is_immutable (node->db)) return;
 
@@ -1171,8 +1171,8 @@ ephy_node_sort_children (EphyNode *node,
 
        g_ptr_array_sort (newkids, compare_func);
 
-       new_order = g_new (int, newkids->len);
-       memset (new_order, -1, sizeof (int) * newkids->len);
+       new_order = g_new (guint, newkids->len);
+       memset (new_order, -1, sizeof (guint) * newkids->len);
 
        for (i = 0; i < newkids->len; i++)
        {
@@ -1199,7 +1199,7 @@ ephy_node_reorder_children (EphyNode *node,
                            int *new_order)
 {
        GPtrArray *newkids;
-       int i;
+       guint i;
 
        g_return_if_fail (EPHY_IS_NODE (node));
        g_return_if_fail (new_order != NULL);
diff --git a/lib/ephy-profile-migrator.c b/lib/ephy-profile-migrator.c
index 698b944..20818c0 100644
--- a/lib/ephy-profile-migrator.c
+++ b/lib/ephy-profile-migrator.c
@@ -153,7 +153,7 @@ parse_and_decrypt_signons (const char *signons,
 {
   int version;
   gchar **lines;
-  int i;
+  guint i;
   guint length;
 
   lines = g_strsplit (signons, "\r\n", -1);
diff --git a/lib/ephy-string.c b/lib/ephy-string.c
index 2abea49..5e866cf 100644
--- a/lib/ephy-string.c
+++ b/lib/ephy-string.c
@@ -44,7 +44,7 @@ ephy_string_to_int (const char *string, gulong *integer)
   result = strtol (string, &parse_end, 0);
 
   /* Check that the result is in range. */
-  if ((result == G_MINLONG || result == G_MAXLONG) && errno == ERANGE)
+  if (errno == ERANGE)
     return FALSE;
 
   /* Check that all the trailing characters are spaces. */
@@ -108,7 +108,7 @@ ephy_string_shorten (char *str,
   
   /* if the string is already short enough, or if it's too short for
    * us to shorten it, return a new copy */
-  if (actual_length <= target_length)
+  if ((gsize)actual_length <= target_length)
     return str;
   
   /* create string */
diff --git a/lib/ephy-web-dom-utils.c b/lib/ephy-web-dom-utils.c
index 0001536..19b2cb7 100644
--- a/lib/ephy-web-dom-utils.c
+++ b/lib/ephy-web-dom-utils.c
@@ -39,7 +39,7 @@ ephy_web_dom_utils_has_modified_forms (WebKitDOMDocument *document)
 {
   WebKitDOMHTMLCollection *forms;
   gulong forms_n;
-  int i;
+  guint i;
 
   forms = webkit_dom_document_get_forms (document);
   forms_n = webkit_dom_html_collection_get_length (forms);
@@ -48,7 +48,7 @@ ephy_web_dom_utils_has_modified_forms (WebKitDOMDocument *document)
     WebKitDOMHTMLCollection *elements;
     WebKitDOMNode *form_element = webkit_dom_html_collection_item (forms, i);
     gulong elements_n;
-    int j;
+    guint j;
     gboolean modified_input_element = FALSE;
 
     elements = webkit_dom_html_form_element_get_elements (WEBKIT_DOM_HTML_FORM_ELEMENT (form_element));
diff --git a/lib/widgets/ephy-location-entry.c b/lib/widgets/ephy-location-entry.c
index bf52697..42731b7 100644
--- a/lib/widgets/ephy-location-entry.c
+++ b/lib/widgets/ephy-location-entry.c
@@ -465,7 +465,7 @@ entry_key_press_after_cb (GtkEntry *entry,
                const char *string;
 
                string = gtk_entry_get_text (entry);
-               if (gtk_editable_get_position (GTK_EDITABLE (entry)) == strlen (string))
+               if (gtk_editable_get_position (GTK_EDITABLE (entry)) == (int)strlen (string))
                {
                        g_signal_emit_by_name (entry, "changed", 0);
                        return TRUE;
diff --git a/lib/widgets/ephy-node-view.c b/lib/widgets/ephy-node-view.c
index 7336606..1b98cb9 100644
--- a/lib/widgets/ephy-node-view.c
+++ b/lib/widgets/ephy-node-view.c
@@ -780,7 +780,7 @@ button_release_cb (GtkWidget *widget,
                   GdkEventButton *event,
                   EphyNodeView *view)
 {
-       if (event->button == view->priv->drag_button)
+       if ((int)event->button == view->priv->drag_button)
        {
                stop_drag_check (view);
                if (!view->priv->drag_started)
diff --git a/lib/widgets/ephy-zoom-action.c b/lib/widgets/ephy-zoom-action.c
index f1e0290..1f6eb0c 100644
--- a/lib/widgets/ephy-zoom-action.c
+++ b/lib/widgets/ephy-zoom-action.c
@@ -80,7 +80,7 @@ create_menu_item (GtkAction *action)
        EphyZoomActionPrivate *p = EPHY_ZOOM_ACTION (action)->priv;
        GtkWidget *menu, *menu_item;
        GSList *group = NULL;
-       int i;
+       guint i;
 
        menu = gtk_menu_new ();
 
diff --git a/src/bookmarks/ephy-bookmarks-editor.c b/src/bookmarks/ephy-bookmarks-editor.c
index 20b48cf..cc490af 100644
--- a/src/bookmarks/ephy-bookmarks-editor.c
+++ b/src/bookmarks/ephy-bookmarks-editor.c
@@ -661,7 +661,8 @@ export_format_combo_changed_cb (GtkComboBox *combo,
                                GtkFileChooser *chooser)
 {
        char *filename, *basename, *dot, *newname;
-       int i, format;
+       guint i;
+        gint format;
 
        filename = gtk_file_chooser_get_filename (chooser);
        if (filename == NULL) return;
@@ -675,7 +676,7 @@ export_format_combo_changed_cb (GtkComboBox *combo,
        }
 
        format = gtk_combo_box_get_active (GTK_COMBO_BOX (combo));
-       g_return_if_fail (format >= 0 && format < G_N_ELEMENTS (export_formats));
+       g_return_if_fail (format >= 0 && (guint)format < G_N_ELEMENTS (export_formats));
 
        dot = strrchr (basename, '.');
        if (dot != NULL)
@@ -729,7 +730,7 @@ export_dialog_response_cb (GtkWidget *dialog,
        g_return_if_fail (combo != NULL);
 
        format = gtk_combo_box_get_active (GTK_COMBO_BOX (combo));
-       g_return_if_fail (format >= 0 && format < G_N_ELEMENTS (export_formats));
+       g_return_if_fail (format >= 0 && (guint)format < G_N_ELEMENTS (export_formats));
 
        gtk_widget_destroy (dialog);
 
@@ -751,7 +752,7 @@ cmd_bookmarks_export (GtkAction *action,
                      EphyBookmarksEditor *editor)
 {
        GtkWidget *dialog, *hbox, *label, *combo;
-       int format;
+       guint format;
        char *filename;
 
        dialog = GTK_WIDGET (ephy_file_chooser_new (_("Export Bookmarks"),
diff --git a/src/bookmarks/ephy-bookmarks-export.c b/src/bookmarks/ephy-bookmarks-export.c
index d8b970b..e8dd982 100644
--- a/src/bookmarks/ephy-bookmarks-export.c
+++ b/src/bookmarks/ephy-bookmarks-export.c
@@ -65,7 +65,7 @@ write_topics_list (EphyNode *topics,
 {
        GPtrArray *children;
        GList *keywords = NULL, *l;
-       int i;
+       guint i;
        int ret = 0;
 
        children = ephy_node_get_children (topics);
@@ -120,7 +120,8 @@ write_rdf (EphyBookmarks *bookmarks,
        EphyNode *bmks, *topics, *smart_bmks;
        GPtrArray *children;
        char *file_uri;
-       int i, ret;
+       guint i;
+        gint ret;
        xmlChar *safeString;
 #ifdef ENABLE_ZEROCONF
        EphyNode *local;
diff --git a/src/bookmarks/ephy-bookmarks.c b/src/bookmarks/ephy-bookmarks.c
index 87fc5d1..8a9ec59 100644
--- a/src/bookmarks/ephy-bookmarks.c
+++ b/src/bookmarks/ephy-bookmarks.c
@@ -110,7 +110,7 @@ G_DEFINE_TYPE (EphyBookmarks, ephy_bookmarks, G_TYPE_OBJECT)
 static void
 ephy_bookmarks_init_defaults (EphyBookmarks *eb)
 {
-       int i;
+       guint i;
 
        for (i = 0; i < G_N_ELEMENTS (default_topics); i++)
        {
@@ -252,7 +252,7 @@ static void
 update_bookmark_keywords (EphyBookmarks *eb, EphyNode *bookmark)
 {
        GPtrArray *children;
-       int i;
+       guint i;
        GString *list;
        const char *title;
        char *normalized_keywords, *case_normalized_keywords;
@@ -322,7 +322,7 @@ static gboolean
 bookmark_is_categorized (EphyBookmarks *eb, EphyNode *bookmark)
 {
        GPtrArray *children;
-       int i;
+       guint i;
 
        children = ephy_node_get_children (eb->priv->keywords);
        for (i = 0; i < children->len; i++)
@@ -350,7 +350,7 @@ topics_removed_cb (EphyNode *node,
                   EphyBookmarks *eb)
 {
        GPtrArray *children;
-       int i;
+       guint i;
 
        children = ephy_node_get_children (child);
        for (i = 0; i < children->len; i++)
@@ -378,7 +378,7 @@ fix_hierarchy_topic (EphyBookmarks *eb,
        EphyNode *bookmark;
        const char *name;
        char **split;
-       int i, j;
+       guint i, j;
 
        children = ephy_node_get_children (topic);
        name = ephy_node_get_property_string (topic, EPHY_NODE_KEYWORD_PROP_NAME);
@@ -463,7 +463,7 @@ static GHashTable *
 decode_txt_record (AvahiStringList *input_text)
 {
        GHashTable *hash;
-       int i;
+       guint i;
        int len;
        char *key, *value, *end;
        char *key_dup, *value_dup;
@@ -1186,7 +1186,7 @@ ephy_bookmarks_find_bookmark (EphyBookmarks *eb,
                              const char *url)
 {
        GPtrArray *children;
-       int i;
+       guint i;
 
        g_return_val_if_fail (EPHY_IS_BOOKMARKS (eb), NULL);
        g_return_val_if_fail (eb->priv->bookmarks != NULL, NULL);
@@ -1241,7 +1241,7 @@ ephy_bookmarks_get_similar (EphyBookmarks *eb,
 {
        GPtrArray *children;
        const char *url;
-       int i, result;
+       guint i, result;
 
        g_return_val_if_fail (EPHY_IS_BOOKMARKS (eb), -1);
        g_return_val_if_fail (eb->priv->bookmarks != NULL, -1);
@@ -1521,7 +1521,7 @@ ephy_bookmarks_find_keyword (EphyBookmarks *eb,
 {
        EphyNode *node;
        GPtrArray *children;
-       int i;
+       guint i;
        const char *topic_name;
 
        g_return_val_if_fail (name != NULL, NULL);
diff --git a/src/bookmarks/ephy-topic-action-group.c b/src/bookmarks/ephy-topic-action-group.c
index 12b471b..521c9ac 100644
--- a/src/bookmarks/ephy-topic-action-group.c
+++ b/src/bookmarks/ephy-topic-action-group.c
@@ -97,7 +97,7 @@ ephy_topic_action_group_new (EphyNode *node,
 {
        GPtrArray *children;
        GtkActionGroup *action_group;
-       int i;
+       guint i;
        
        children = ephy_node_get_children (node);
        action_group = gtk_action_group_new ("TpAc");
diff --git a/src/bookmarks/ephy-topics-entry.c b/src/bookmarks/ephy-topics-entry.c
index 3722976..f872c8d 100644
--- a/src/bookmarks/ephy-topics-entry.c
+++ b/src/bookmarks/ephy-topics-entry.c
@@ -132,7 +132,8 @@ update_widget (EphyTopicsEntry *entry)
        EphyNode *node;
        GPtrArray *children, *topics;
        GtkTreeIter iter;
-       gint i, priority, pos;
+       guint i;
+        gint priority, pos;
        const char *title;
        char *tmp1, *tmp2;
        gboolean is_focus;
diff --git a/src/bookmarks/ephy-topics-palette.c b/src/bookmarks/ephy-topics-palette.c
index 142287e..1ab0844 100644
--- a/src/bookmarks/ephy-topics-palette.c
+++ b/src/bookmarks/ephy-topics-palette.c
@@ -69,7 +69,7 @@ append_topics (EphyTopicsPalette *self,
 {
        EphyNode *node;
        const char *title;
-       gint i;
+       guint i;
 
        if (topics->len == 0)
        {
@@ -108,7 +108,8 @@ ephy_topics_palette_update_list (EphyTopicsPalette *self)
        GPtrArray *children, *bookmarks, *topics;
        EphyNode *node;
        GtkTreeIter iter;
-       gint i, priority;
+       guint i;
+        gint priority;
        gboolean valid, first;
 
        valid = gtk_tree_model_get_iter_first (GTK_TREE_MODEL (self), &iter);
diff --git a/src/ephy-completion-model.c b/src/ephy-completion-model.c
index 41f3541..bb74587 100644
--- a/src/ephy-completion-model.c
+++ b/src/ephy-completion-model.c
@@ -488,7 +488,7 @@ query_completed_cb (EphyHistoryService *service,
   GList *p, *urls;
   GPtrArray *children;
   GSList *list = NULL;
-  int i;
+  guint i;
 
   /* Bookmarks */
   children = ephy_node_get_children (priv->bookmarks);
diff --git a/src/ephy-location-controller.c b/src/ephy-location-controller.c
index d827280..ad02fad 100644
--- a/src/ephy-location-controller.c
+++ b/src/ephy-location-controller.c
@@ -744,7 +744,7 @@ static void
 init_actions_list (EphyLocationController *controller)
 {
        GPtrArray *children;
-       int i;
+       guint i;
 
        children = ephy_node_get_children (controller->priv->smart_bmks);
        for (i = 0; i < children->len; i++)
diff --git a/src/ephy-window.c b/src/ephy-window.c
index 0b04ca0..fa8f3c2 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -3303,15 +3303,15 @@ ephy_window_toggle_visibility_for_app_menu (EphyWindow *window)
        gboolean shows_app_menu;
        GtkSettings *settings;
        GtkAction *action;
-       gint idx;
+       guint i;
 
        settings = gtk_settings_get_for_screen (gtk_widget_get_screen (GTK_WIDGET (window)));
        g_object_get (settings,
                      "gtk-shell-shows-app-menu", &shows_app_menu,
                      NULL);
 
-       for (idx = 0; idx < G_N_ELEMENTS (app_actions); idx++) {
-               action_name = app_actions[idx];
+       for (i = 0; i < G_N_ELEMENTS (app_actions); i++) {
+               action_name = app_actions[i];
                action = gtk_action_group_get_action (window->priv->action_group, action_name);
 
                gtk_action_set_visible (action, !shows_app_menu);
@@ -3332,7 +3332,7 @@ ephy_window_constructor (GType type,
        GError *error = NULL;
        guint settings_connection;
        GtkCssProvider *css_provider;
-       int i;
+       guint i;
        EphyEmbedShellMode mode;
        EphyWindowChrome chrome = EPHY_WINDOW_CHROME_DEFAULT;
 
diff --git a/src/prefs-dialog.c b/src/prefs-dialog.c
index 8c15824..2f60c4c 100644
--- a/src/prefs-dialog.c
+++ b/src/prefs-dialog.c
@@ -605,7 +605,7 @@ setup_add_language_dialog (PrefsDialog *dialog)
        GtkTreeViewColumn *column;
        GtkTreeSelection *selection;
        GtkTreeIter iter;
-       int i;
+       guint i;
        GtkBuilder *builder;
 
        builder = gtk_builder_new_from_resource ("/org/gnome/epiphany/prefs-lang-dialog.ui");
@@ -1004,7 +1004,7 @@ cookies_set_mapping (const GValue *value,
 static void
 search_engine_combo_add_default_engines (GtkListStore *store)
 {
-       int i;
+       guint i;
        const char *default_engines[][3] = { /* Search engine option in the preferences dialog */
                                             { N_("DuckDuckGo"),
                                               "https://duckduckgo.com/?q=%s&t=epiphany";,
@@ -1040,7 +1040,7 @@ search_engine_combo_add_default_engines (GtkListStore *store)
 static void
 search_engine_combo_add_smart_bookmarks (GtkListStore *store)
 {
-       int i;
+       guint i;
        EphyBookmarks *bookmarks;
        EphyNode *smart_bookmarks_parent_node;
        GPtrArray *smart_bookmarks;
diff --git a/src/window-commands.c b/src/window-commands.c
index f651dc6..ddf4478 100644
--- a/src/window-commands.c
+++ b/src/window-commands.c
@@ -617,7 +617,7 @@ static char *
 get_special_case_application_title_for_host (const char *host)
 {
        char *title = NULL;
-       int i;
+       guint i;
 
        for (i = 0; i < G_N_ELEMENTS (sites) && title == NULL; i++)
        {
@@ -1256,7 +1256,7 @@ save_temp_source_write_cb (GOutputStream *ostream, GAsyncResult *result, GString
                return;
        }
 
-       if (written == data->len)
+       if (written == (gint)data->len)
        {
                g_string_free (data, TRUE);
 
diff --git a/tests/ephy-bookmarks-test.c b/tests/ephy-bookmarks-test.c
index 3adad21..ab76042 100644
--- a/tests/ephy-bookmarks-test.c
+++ b/tests/ephy-bookmarks-test.c
@@ -32,7 +32,7 @@ clear_bookmark_files (void)
 {
   GFile *file;
   char *path;
-  int i;
+  guint i;
 
   for (i = 0; i < G_N_ELEMENTS (bookmarks_paths); i++) {
 
diff --git a/tests/ephy-embed-utils-test.c b/tests/ephy-embed-utils-test.c
index 42529f3..5d42032 100644
--- a/tests/ephy-embed-utils-test.c
+++ b/tests/ephy-embed-utils-test.c
@@ -126,7 +126,7 @@ test_is_empty (const IsEmptyTest *test)
 int
 main (int argc, char *argv[])
 {
-  int i;
+  guint i;
   gtk_test_init (&argc, &argv);
 
   for (i = 0; i < G_N_ELEMENTS (tests_has_scheme); i++) {
diff --git a/tests/ephy-file-helpers-test.c b/tests/ephy-file-helpers-test.c
index 20a1f3c..0ec310e 100644
--- a/tests/ephy-file-helpers-test.c
+++ b/tests/ephy-file-helpers-test.c
@@ -42,7 +42,7 @@ static const FileInitTest private_tests[] =
 static void
 test_ephy_file_helpers_init (void)
 {
-  int i;
+  guint i;
 
   for (i = 0; i < G_N_ELEMENTS (private_tests); i++) {
     FileInitTest test;
@@ -119,7 +119,7 @@ static const DownloadsDirTest downloads_tests[] =
 static void
 test_ephy_file_get_downloads_dir (void)
 {
-  int i;
+  guint i;
 
   ephy_file_helpers_init (NULL, EPHY_FILE_HELPERS_PRIVATE_PROFILE, NULL);
 
@@ -172,7 +172,7 @@ static const DirTest dir_tests[] =
 static void
 test_ephy_file_create_delete_dir (void)
 {
-  int i;
+  guint i;
 
   ephy_file_helpers_init (NULL, EPHY_FILE_HELPERS_PRIVATE_PROFILE, NULL);
 
diff --git a/tests/ephy-string-test.c b/tests/ephy-string-test.c
index 3af4752..619f7b7 100644
--- a/tests/ephy-string-test.c
+++ b/tests/ephy-string-test.c
@@ -42,7 +42,7 @@ static const HostnameTest hostname_tests[] = {
 static void
 test_ephy_string_get_hostname (void)
 {
-  int i;
+  guint i;
 
   for (i = 0; i < G_N_ELEMENTS (hostname_tests); i++) {
     char *host;
diff --git a/tests/ephy-web-view-test.c b/tests/ephy-web-view-test.c
index 423065a..cc0b789 100644
--- a/tests/ephy-web-view-test.c
+++ b/tests/ephy-web-view-test.c
@@ -137,7 +137,7 @@ static const URLTest test_load_url[] = {
 static void
 test_ephy_web_view_load_url (void)
 {
-  int i;
+  guint i;
 
   for (i = 0; i < G_N_ELEMENTS (test_load_url); i++) {
     URLTest test;
@@ -207,7 +207,7 @@ test_ephy_web_view_non_search_regex (void)
 {
   GRegex *regex_non_search, *regex_domain;
   GError *error = NULL;
-  int i;
+  guint i;
 
   regex_non_search = g_regex_new (EPHY_WEB_VIEW_NON_SEARCH_REGEX,
                                   0, G_REGEX_MATCH_NOTEMPTY, &error);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]