[epiphany] build: Fix -Werror build for clang



commit 9f00bb5991e48efb65e463c436179cb29aa87e0c
Author: Ting-Wei Lan <lantw src gnome org>
Date:   Tue Jul 7 16:11:04 2015 +0800

    build: Fix -Werror build for clang
    
    https://bugzilla.gnome.org/show_bug.cgi?id=752050

 embed/ephy-embed-prefs.c              |    4 ++--
 embed/ephy-find-toolbar.c             |    3 +++
 embed/ephy-web-view.c                 |    2 +-
 lib/ephy-langs.c                      |    2 +-
 src/bookmarks/ephy-bookmarks-editor.c |    6 +++---
 src/bookmarks/ephy-bookmarks-export.c |    2 +-
 6 files changed, 11 insertions(+), 8 deletions(-)
---
diff --git a/embed/ephy-embed-prefs.c b/embed/ephy-embed-prefs.c
index 4137631..734c0a0 100644
--- a/embed/ephy-embed-prefs.c
+++ b/embed/ephy-embed-prefs.c
@@ -363,10 +363,10 @@ webkit_pref_callback_accept_languages (GSettings *settings,
 
   ephy_langs_sanitise (array);
 
-  webkit_web_context_set_preferred_languages (web_context, (const char * const *)array->data);
+  webkit_web_context_set_preferred_languages (web_context, (const char * const *)(void *)array->data);
 
   if (g_settings_get_boolean (EPHY_SETTINGS_WEB, EPHY_PREFS_WEB_ENABLE_SPELL_CHECKING)) {
-    char **normalized = normalize_languages ((char **)array->data);
+    char **normalized = normalize_languages ((char **)(void *)array->data);
     webkit_web_context_set_spell_checking_languages (web_context, (const char * const *)normalized);
     g_strfreev (normalized);
   }
diff --git a/embed/ephy-find-toolbar.c b/embed/ephy-find-toolbar.c
index 3126a58..951d82e 100644
--- a/embed/ephy-find-toolbar.c
+++ b/embed/ephy-find-toolbar.c
@@ -513,6 +513,9 @@ ephy_find_toolbar_dispose (GObject *object)
        G_OBJECT_CLASS (ephy_find_toolbar_parent_class)->dispose (object);
 }
 
+#ifndef G_DISABLE_ASSERT
+G_GNUC_NORETURN
+#endif
 static void
 ephy_find_toolbar_get_property (GObject *object,
                                guint prop_id,
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c
index aa3f3c9..339f171 100644
--- a/embed/ephy-web-view.c
+++ b/embed/ephy-web-view.c
@@ -1733,7 +1733,7 @@ get_style_sheet (void)
 {
   const gchar *file;
   GError *error = NULL;
-  char *sheet;
+  char *sheet = NULL;
 
   file = ephy_file ("error.css");
   if (file && !g_file_get_contents (file, &sheet, NULL, &error)) {
diff --git a/lib/ephy-langs.c b/lib/ephy-langs.c
index ccfcbc0..f1026e5 100644
--- a/lib/ephy-langs.c
+++ b/lib/ephy-langs.c
@@ -147,7 +147,7 @@ ephy_langs_get_languages (void)
 
        ephy_langs_sanitise (array);
 
-       return (char **) g_array_free (array, FALSE);
+       return (char **)(void *) g_array_free (array, FALSE);
 }
 
 static void
diff --git a/src/bookmarks/ephy-bookmarks-editor.c b/src/bookmarks/ephy-bookmarks-editor.c
index 98cafc2..91a1349 100644
--- a/src/bookmarks/ephy-bookmarks-editor.c
+++ b/src/bookmarks/ephy-bookmarks-editor.c
@@ -401,7 +401,7 @@ cmd_delete (GtkAction *action,
        }
        else if (ephy_node_view_is_target (EPHY_NODE_VIEW (editor->priv->key_view)))
        {
-               EphyNodePriority priority;
+               int priority;
                GList *selected;
                EphyNode *node;
 
@@ -1126,7 +1126,7 @@ ephy_bookmarks_editor_update_menu (EphyBookmarksEditor *editor)
        if (key_focus && selected)
        {
                EphyNode *node = selected->data;
-               EphyNodePriority priority;
+               int priority;
                char name[EPHY_TOPIC_ACTION_NAME_BUFFER_SIZE];
 
                priority = ephy_node_get_property_int
@@ -1569,7 +1569,7 @@ ephy_bookmarks_editor_construct (EphyBookmarksEditor *editor)
                          G_CALLBACK (view_selection_changed_cb),
                          editor);
        ephy_node_view_set_priority (EPHY_NODE_VIEW (key_view),
-                                    EPHY_NODE_KEYWORD_PROP_PRIORITY);
+                                    (EphyNodeViewPriority)EPHY_NODE_KEYWORD_PROP_PRIORITY);
        ephy_node_view_set_sort (EPHY_NODE_VIEW (key_view), G_TYPE_STRING,
                                 EPHY_NODE_KEYWORD_PROP_NAME, GTK_SORT_ASCENDING);
        gtk_container_add (GTK_CONTAINER (scrolled_window), key_view);
diff --git a/src/bookmarks/ephy-bookmarks-export.c b/src/bookmarks/ephy-bookmarks-export.c
index d7f8b78..57c7cb9 100644
--- a/src/bookmarks/ephy-bookmarks-export.c
+++ b/src/bookmarks/ephy-bookmarks-export.c
@@ -74,7 +74,7 @@ write_topics_list (EphyNode *topics,
        for (i = 0; i < children->len; i++)
        {
                EphyNode *kid;
-               EphyNodePriority priority;
+               int priority;
 
                kid = g_ptr_array_index (children, i);
 


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