[epiphany] Remove a few GCC 4.6.0 warnings
- From: Xan Lopez <xan src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] Remove a few GCC 4.6.0 warnings
- Date: Wed, 20 Apr 2011 17:52:10 +0000 (UTC)
commit 85e3c2e1129a1d0d3d5dd0c1bdab883ea7b027b5
Author: Xan Lopez <xlopez igalia com>
Date: Wed Apr 20 01:14:05 2011 -0700
Remove a few GCC 4.6.0 warnings
embed/ephy-download.c | 2 --
embed/ephy-embed-prefs.c | 2 --
lib/ephy-print-utils.c | 4 ----
lib/ephy-state.c | 4 ----
lib/widgets/ephy-node-view.c | 4 ----
lib/widgets/ephy-zoom-control.c | 2 --
src/bookmarks/ephy-bookmarks.c | 5 +----
src/ephy-shell.c | 6 ------
src/ephy-toolbar.c | 4 +---
src/prefs-dialog.c | 4 +---
tests/ephy-location-entry.c | 3 ---
11 files changed, 3 insertions(+), 37 deletions(-)
---
diff --git a/embed/ephy-download.c b/embed/ephy-download.c
index 3a7d2d1..51f08ea 100644
--- a/embed/ephy-download.c
+++ b/embed/ephy-download.c
@@ -148,7 +148,6 @@ decide_action_from_mime (EphyDownload *ephy_download)
SoupMessage *message;
char *mime_description = NULL;
GAppInfo *helper_app = NULL;
- EphyMimePermission mime_permission = EPHY_MIME_PERMISSION_SAFE;
EphyDownloadActionType action;
WebKitDownload *download;
@@ -163,7 +162,6 @@ decide_action_from_mime (EphyDownload *ephy_download)
if (content_type) {
mime_description = g_content_type_get_description (content_type);
helper_app = g_app_info_get_default_for_type (content_type, FALSE);
- mime_permission = ephy_file_check_mime (content_type);
if (helper_app)
action = EPHY_DOWNLOAD_ACTION_OPEN;
diff --git a/embed/ephy-embed-prefs.c b/embed/ephy-embed-prefs.c
index 3b035ab..2d29733 100644
--- a/embed/ephy-embed-prefs.c
+++ b/embed/ephy-embed-prefs.c
@@ -329,10 +329,8 @@ webkit_pref_callback_cookie_accept_policy (GSettings *settings,
gpointer data)
{
SoupSession *session;
- char *webkit_pref;
char *value = NULL;
- webkit_pref = data;
value = g_settings_get_string (settings, key);
if (value) {
diff --git a/lib/ephy-print-utils.c b/lib/ephy-print-utils.c
index 3c6a6e4..dbb2820 100644
--- a/lib/ephy-print-utils.c
+++ b/lib/ephy-print-utils.c
@@ -89,7 +89,6 @@ ephy_print_utils_page_setup_new_from_key_file (GKeyFile *key_file,
GtkPaperSize *paper_size = NULL;
gdouble width, height, top, bottom, left, right;
char *name = NULL, *ppd_name = NULL, *display_name = NULL, *orientation = NULL;
- gboolean retval = TRUE;
GError *err = NULL;
g_return_val_if_fail (key_file != NULL, NULL);
@@ -97,7 +96,6 @@ ephy_print_utils_page_setup_new_from_key_file (GKeyFile *key_file,
if (!g_key_file_has_group (key_file, PAGE_SETUP_GROUP) ||
!g_key_file_has_group (key_file, PAPER_SIZE_GROUP)) {
g_set_error (error, ERROR_QUARK, 0, "Not a valid epiphany page setup file");
- retval = FALSE;
goto out;
}
@@ -105,7 +103,6 @@ ephy_print_utils_page_setup_new_from_key_file (GKeyFile *key_file,
v = g_key_file_get_double (kf, group, name, &err); \
if (err != NULL) {\
g_propagate_error (error, err);\
- retval = FALSE;\
goto out;\
}
@@ -130,7 +127,6 @@ if (err != NULL) {\
if ((ppd_name == NULL && name == NULL) || orientation == NULL)
{
g_set_error (error, ERROR_QUARK, 0, "Not a valid epiphany page setup file");
- retval = FALSE;
goto out;
}
diff --git a/lib/ephy-state.c b/lib/ephy-state.c
index 0a347c9..84e9c4e 100644
--- a/lib/ephy-state.c
+++ b/lib/ephy-state.c
@@ -103,12 +103,8 @@ ensure_states (void)
{
if (states == NULL)
{
- volatile GType flags_type; /* work around gcc's optimiser */
char *xml_file;
- /* make sure the type is known when we read the db */
- flags_type = EPHY_TYPE_STATE_WINDOW_FLAGS;
-
xml_file = g_build_filename (ephy_dot_dir (),
EPHY_STATES_XML_FILE,
NULL);
diff --git a/lib/widgets/ephy-node-view.c b/lib/widgets/ephy-node-view.c
index 2f54291..eabdaa4 100644
--- a/lib/widgets/ephy-node-view.c
+++ b/lib/widgets/ephy-node-view.c
@@ -1605,12 +1605,8 @@ ephy_node_view_enable_drag_source (EphyNodeView *view,
int base_drag_column_id,
int extra_drag_column_id)
{
- GtkWidget *treeview;
-
g_return_if_fail (view != NULL);
- treeview = GTK_WIDGET (view);
-
view->priv->source_target_list =
gtk_target_list_new (types, n_types);
diff --git a/lib/widgets/ephy-zoom-control.c b/lib/widgets/ephy-zoom-control.c
index c61c994..fc132d4 100644
--- a/lib/widgets/ephy-zoom-control.c
+++ b/lib/widgets/ephy-zoom-control.c
@@ -173,10 +173,8 @@ static void
ephy_zoom_control_class_init (EphyZoomControlClass *klass)
{
GObjectClass *object_class;
- GtkToolItemClass *tool_item_class;
object_class = (GObjectClass *)klass;
- tool_item_class = (GtkToolItemClass *)klass;
object_class->set_property = ephy_zoom_control_set_property;
object_class->get_property = ephy_zoom_control_get_property;
diff --git a/src/bookmarks/ephy-bookmarks.c b/src/bookmarks/ephy-bookmarks.c
index ec199dc..9708da5 100644
--- a/src/bookmarks/ephy-bookmarks.c
+++ b/src/bookmarks/ephy-bookmarks.c
@@ -119,10 +119,7 @@ static char *impl_resolve_address (EphyBookmarks*, const char*, const char*);
static void ephy_local_bookmarks_start_client (EphyBookmarks *bookmarks);
#endif
-G_DEFINE_TYPE_WITH_CODE (EphyBookmarks, ephy_bookmarks, G_TYPE_OBJECT,
- volatile GType flags_type; /* work around gcc's optimiser */
- /* make sure the flags type is known */
- flags_type = EPHY_TYPE_BOOKMARK_PROPERTY;)
+G_DEFINE_TYPE (EphyBookmarks, ephy_bookmarks, G_TYPE_OBJECT)
static void
ephy_bookmarks_init_defaults (EphyBookmarks *eb)
diff --git a/src/ephy-shell.c b/src/ephy-shell.c
index 6fddf9d..ef45fb4 100644
--- a/src/ephy-shell.c
+++ b/src/ephy-shell.c
@@ -685,11 +685,8 @@ ephy_shell_get_net_monitor (EphyShell *shell)
static void
toolwindow_show_cb (GtkWidget *widget, EphyShell *es)
{
- EphySession *session;
-
LOG ("Ref shell for %s", G_OBJECT_TYPE_NAME (widget));
- session = EPHY_SESSION (ephy_shell_get_session (es));
ephy_session_add_window (ephy_shell->priv->session, GTK_WINDOW (widget));
g_object_ref (ephy_shell);
}
@@ -697,11 +694,8 @@ toolwindow_show_cb (GtkWidget *widget, EphyShell *es)
static void
toolwindow_hide_cb (GtkWidget *widget, EphyShell *es)
{
- EphySession *session;
-
LOG ("Unref shell for %s", G_OBJECT_TYPE_NAME (widget));
- session = EPHY_SESSION (ephy_shell_get_session (es));
ephy_session_remove_window (ephy_shell->priv->session, GTK_WINDOW (widget));
g_object_unref (ephy_shell);
}
diff --git a/src/ephy-toolbar.c b/src/ephy-toolbar.c
index 84191ce..4bec114 100644
--- a/src/ephy-toolbar.c
+++ b/src/ephy-toolbar.c
@@ -585,9 +585,7 @@ ephy_toolbar_set_zoom (EphyToolbar *toolbar,
static void
ephy_toolbar_init (EphyToolbar *toolbar)
{
- EphyToolbarPrivate *priv;
-
- priv = toolbar->priv = EPHY_TOOLBAR_GET_PRIVATE (toolbar);
+ toolbar->priv = EPHY_TOOLBAR_GET_PRIVATE (toolbar);
egg_editable_toolbar_set_primary_class (EGG_EDITABLE_TOOLBAR (toolbar), TRUE, NULL);
}
diff --git a/src/prefs-dialog.c b/src/prefs-dialog.c
index 296c6b1..8c0cd31 100644
--- a/src/prefs-dialog.c
+++ b/src/prefs-dialog.c
@@ -223,7 +223,7 @@ create_node_combo (EphyDialog *dialog,
GtkComboBox *combo;
GtkCellRenderer *renderer;
char *code;
- int title_col, data_col;
+ int title_col;
code = g_settings_get_string (EPHY_SETTINGS_WEB,
EPHY_PREFS_WEB_DEFAULT_ENCODING);
@@ -243,8 +243,6 @@ create_node_combo (EphyDialog *dialog,
title_col = ephy_tree_model_node_add_prop_column
(nodemodel, G_TYPE_STRING, EPHY_NODE_ENCODING_PROP_TITLE_ELIDED);
- data_col = ephy_tree_model_node_add_prop_column
- (nodemodel, G_TYPE_STRING, EPHY_NODE_ENCODING_PROP_ENCODING);
sortmodel = ephy_tree_model_sort_new (GTK_TREE_MODEL (nodemodel));
diff --git a/tests/ephy-location-entry.c b/tests/ephy-location-entry.c
index bac969e..6ce9c86 100644
--- a/tests/ephy-location-entry.c
+++ b/tests/ephy-location-entry.c
@@ -50,14 +50,11 @@ static void
test_entry_set_location (void)
{
const char *set = "test";
- const char *null;
const char *get;
EphyLocationEntry *entry;
entry = EPHY_LOCATION_ENTRY (ephy_location_entry_new ());
- null = ephy_location_entry_get_location (entry);
-
ephy_location_entry_set_location (entry, set);
get = ephy_location_entry_get_location (entry);
g_assert_cmpstr (set, ==, get);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]