Fix GCC 4.6 warnings about set but unused variables

This commit is contained in:
Paweł Forysiuk 2011-04-29 03:41:04 +02:00 committed by Christian Dywan
parent 3ec724c3dc
commit bbfa7f6030
9 changed files with 7 additions and 49 deletions

View file

@ -1221,10 +1221,10 @@ adblock_frame_add_private (const gchar* line,
if (strchr (data[0], ',')) if (strchr (data[0], ','))
{ {
gchar** domains; gchar** domains;
gint max, i; gint i;
domains = g_strsplit (data[0], ",", -1); domains = g_strsplit (data[0], ",", -1);
for (max = i = 0; domains[i]; i++) for (i = 0; domains[i]; i++)
{ {
new_blockcss = g_strdup_printf ("%s;\nsites['%s']+=',%s'", new_blockcss = g_strdup_printf ("%s;\nsites['%s']+=',%s'",
blockcssprivate, g_strstrip (domains[i]), data[1]); blockcssprivate, g_strstrip (domains[i]), data[1]);

View file

@ -430,11 +430,8 @@ feed_panel_popup_item (GtkWidget* menu,
gpointer callback, gpointer callback,
FeedPanel* panel) FeedPanel* panel)
{ {
const gchar* uri;
GtkWidget* menuitem; GtkWidget* menuitem;
uri = katze_item_get_uri (item);
menuitem = gtk_image_menu_item_new_from_stock (stock_id, NULL); menuitem = gtk_image_menu_item_new_from_stock (stock_id, NULL);
if (label) if (label)
gtk_label_set_text_with_mnemonic (GTK_LABEL (gtk_bin_get_child ( gtk_label_set_text_with_mnemonic (GTK_LABEL (gtk_bin_get_child (

View file

@ -551,7 +551,6 @@ katze_array_action_item_notify_cb (KatzeItem* item,
GParamSpec* pspec, GParamSpec* pspec,
GtkToolItem* toolitem) GtkToolItem* toolitem)
{ {
KatzeArrayAction* array_action;
const gchar* property; const gchar* property;
const gchar* title; const gchar* title;
const gchar* desc; const gchar* desc;
@ -561,8 +560,6 @@ katze_array_action_item_notify_cb (KatzeItem* item,
if (!G_IS_PARAM_SPEC_STRING (pspec)) if (!G_IS_PARAM_SPEC_STRING (pspec))
return; return;
array_action = (KatzeArrayAction*)g_object_get_data (
G_OBJECT (toolitem), "KatzeArrayAction");
property = g_param_spec_get_name (pspec); property = g_param_spec_get_name (pspec);
if (!strcmp (property, "name")) if (!strcmp (property, "name"))
{ {

View file

@ -311,13 +311,12 @@ do_timeout_scroll (KatzeScrolled* scrolled)
GtkScrolledWindow* gtk_scrolled = GTK_SCROLLED_WINDOW (scrolled); GtkScrolledWindow* gtk_scrolled = GTK_SCROLLED_WINDOW (scrolled);
GtkAdjustment* hadjustment; GtkAdjustment* hadjustment;
GtkAdjustment* vadjustment; GtkAdjustment* vadjustment;
gdouble hpage_size, hupper, hlower, hvalue, new_hvalue; gdouble hpage_size, hupper, hvalue, new_hvalue;
gdouble vpage_size, vupper, vlower, vvalue, new_vvalue; gdouble vpage_size, vupper, vvalue, new_vvalue;
hadjustment = gtk_scrolled_window_get_hadjustment (gtk_scrolled); hadjustment = gtk_scrolled_window_get_hadjustment (gtk_scrolled);
hpage_size = gtk_adjustment_get_page_size (hadjustment); hpage_size = gtk_adjustment_get_page_size (hadjustment);
hupper = gtk_adjustment_get_upper (hadjustment); hupper = gtk_adjustment_get_upper (hadjustment);
hlower = gtk_adjustment_get_lower (hadjustment);
hvalue = gtk_adjustment_get_value (hadjustment); hvalue = gtk_adjustment_get_value (hadjustment);
new_hvalue = calculate_timeout_scroll_values (hvalue, new_hvalue = calculate_timeout_scroll_values (hvalue,
hupper - hpage_size, hupper - hpage_size,
@ -329,7 +328,6 @@ do_timeout_scroll (KatzeScrolled* scrolled)
vadjustment = gtk_scrolled_window_get_vadjustment (gtk_scrolled); vadjustment = gtk_scrolled_window_get_vadjustment (gtk_scrolled);
vpage_size = gtk_adjustment_get_page_size (vadjustment); vpage_size = gtk_adjustment_get_page_size (vadjustment);
vupper = gtk_adjustment_get_upper (vadjustment); vupper = gtk_adjustment_get_upper (vadjustment);
vlower = gtk_adjustment_get_lower (vadjustment);
vvalue = gtk_adjustment_get_value (vadjustment); vvalue = gtk_adjustment_get_value (vadjustment);
new_vvalue = calculate_timeout_scroll_values (vvalue, new_vvalue = calculate_timeout_scroll_values (vvalue,
vupper - vpage_size, vupper - vpage_size,

View file

@ -1536,12 +1536,11 @@ snapshot_load_finished_cb (GtkWidget* web_view,
{ {
GError* error; GError* error;
GtkPrintOperation* operation = gtk_print_operation_new (); GtkPrintOperation* operation = gtk_print_operation_new ();
GtkPrintOperationAction action = GTK_PRINT_OPERATION_ACTION_EXPORT;
GtkPrintOperationResult result;
gtk_print_operation_set_export_filename (operation, filename); gtk_print_operation_set_export_filename (operation, filename);
error = NULL; error = NULL;
result = webkit_web_frame_print_full (web_frame, operation, action, &error); webkit_web_frame_print_full (web_frame, operation,
GTK_PRINT_OPERATION_ACTION_EXPORT, &error);
if (error != NULL) if (error != NULL)
{ {

View file

@ -703,12 +703,10 @@ static void
string_append_item (GString* string, string_append_item (GString* string,
KatzeItem* item) KatzeItem* item)
{ {
gchar* markup;
gchar* metadata; gchar* metadata;
g_return_if_fail (KATZE_IS_ITEM (item)); g_return_if_fail (KATZE_IS_ITEM (item));
markup = NULL;
metadata = katze_item_metadata_to_xbel (item); metadata = katze_item_metadata_to_xbel (item);
if (KATZE_IS_ARRAY (item)) if (KATZE_IS_ARRAY (item))
{ {

View file

@ -599,10 +599,8 @@ midori_view_notify_title_cb (GtkWidget* widget,
MidoriBrowser* browser) MidoriBrowser* browser)
{ {
MidoriView* view = MIDORI_VIEW (widget); MidoriView* view = MIDORI_VIEW (widget);
const gchar* uri;
const gchar* title; const gchar* title;
uri = midori_view_get_display_uri (view);
title = midori_view_get_display_title (view); title = midori_view_get_display_title (view);
if (midori_view_get_load_status (view) == MIDORI_LOAD_COMMITTED) if (midori_view_get_load_status (view) == MIDORI_LOAD_COMMITTED)
@ -832,7 +830,7 @@ midori_browser_edit_bookmark_dialog_new (MidoriBrowser* browser,
{ {
GtkListStore* model; GtkListStore* model;
GtkCellRenderer* renderer; GtkCellRenderer* renderer;
guint i, n; guint n;
sqlite3_stmt* statement; sqlite3_stmt* statement;
gint result; gint result;
const gchar* sqlcmd; const gchar* sqlcmd;
@ -852,7 +850,6 @@ midori_browser_edit_bookmark_dialog_new (MidoriBrowser* browser,
0, _("Toplevel folder"), 1, PANGO_ELLIPSIZE_END, -1); 0, _("Toplevel folder"), 1, PANGO_ELLIPSIZE_END, -1);
gtk_combo_box_set_active (GTK_COMBO_BOX (combo_folder), 0); gtk_combo_box_set_active (GTK_COMBO_BOX (combo_folder), 0);
i = 0;
n = 1; n = 1;
sqlcmd = "SELECT title from bookmarks where uri=''"; sqlcmd = "SELECT title from bookmarks where uri=''";
result = sqlite3_prepare_v2 (db, sqlcmd, -1, &statement, NULL); result = sqlite3_prepare_v2 (db, sqlcmd, -1, &statement, NULL);
@ -1496,12 +1493,10 @@ midori_browser_tab_destroy_cb (GtkWidget* widget,
MidoriBrowser* browser) MidoriBrowser* browser)
{ {
KatzeItem* item; KatzeItem* item;
const gchar* uri;
if (browser->proxy_array && MIDORI_IS_VIEW (widget)) if (browser->proxy_array && MIDORI_IS_VIEW (widget))
{ {
item = midori_view_get_proxy_item (MIDORI_VIEW (widget)); item = midori_view_get_proxy_item (MIDORI_VIEW (widget));
uri = katze_item_get_uri (item);
if (browser->trash && !midori_view_is_blank (MIDORI_VIEW (widget))) if (browser->trash && !midori_view_is_blank (MIDORI_VIEW (widget)))
katze_array_add_item (browser->trash, item); katze_array_add_item (browser->trash, item);
katze_array_remove_item (browser->proxy_array, item); katze_array_remove_item (browser->proxy_array, item);
@ -4401,7 +4396,6 @@ _action_clear_private_data_activate (GtkAction* action,
{ {
GtkWidget* content_area; GtkWidget* content_area;
GdkScreen* screen; GdkScreen* screen;
GtkIconTheme* icon_theme;
GtkSizeGroup* sizegroup; GtkSizeGroup* sizegroup;
GtkWidget* hbox; GtkWidget* hbox;
GtkWidget* alignment; GtkWidget* alignment;
@ -4426,7 +4420,6 @@ _action_clear_private_data_activate (GtkAction* action,
screen = gtk_widget_get_screen (GTK_WIDGET (browser)); screen = gtk_widget_get_screen (GTK_WIDGET (browser));
if (screen) if (screen)
{ {
icon_theme = gtk_icon_theme_get_for_screen (screen);
gtk_window_set_icon_name (GTK_WINDOW (dialog), GTK_STOCK_CLEAR); gtk_window_set_icon_name (GTK_WINDOW (dialog), GTK_STOCK_CLEAR);
} }
sizegroup = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL); sizegroup = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
@ -5617,9 +5610,6 @@ static void
midori_browser_set_history (MidoriBrowser* browser, midori_browser_set_history (MidoriBrowser* browser,
KatzeArray* history) KatzeArray* history)
{ {
time_t now;
gint64 day;
if (browser->history == history) if (browser->history == history)
return; return;
@ -5638,9 +5628,6 @@ midori_browser_set_history (MidoriBrowser* browser,
g_signal_connect (browser->history, "clear", g_signal_connect (browser->history, "clear",
G_CALLBACK (midori_browser_history_clear_cb), browser); G_CALLBACK (midori_browser_history_clear_cb), browser);
now = time (NULL);
day = sokoke_time_t_to_julian (&now);
g_object_set (_action_by_name (browser, "Location"), "history", g_object_set (_action_by_name (browser, "Location"), "history",
browser->history, NULL); browser->history, NULL);
} }

View file

@ -674,8 +674,6 @@ midori_search_action_set_search_engines (MidoriSearchAction* search_action,
KatzeArray* search_engines) KatzeArray* search_engines)
{ {
GSList* proxies; GSList* proxies;
GtkWidget* alignment;
GtkWidget* entry;
g_return_if_fail (MIDORI_IS_SEARCH_ACTION (search_action)); g_return_if_fail (MIDORI_IS_SEARCH_ACTION (search_action));
g_return_if_fail (!search_engines || g_return_if_fail (!search_engines ||
@ -702,16 +700,6 @@ midori_search_action_set_search_engines (MidoriSearchAction* search_action,
proxies = gtk_action_get_proxies (GTK_ACTION (search_action)); proxies = gtk_action_get_proxies (GTK_ACTION (search_action));
if (!proxies) if (!proxies)
return; return;
do
if (GTK_IS_TOOL_ITEM (proxies->data))
{
alignment = gtk_bin_get_child (GTK_BIN (proxies->data));
entry = gtk_bin_get_child (GTK_BIN (alignment));
/* FIXME: Unset the current item if it isn't in the list */
}
while ((proxies = g_slist_next (proxies)));
} }
KatzeItem* KatzeItem*
@ -824,13 +812,11 @@ midori_search_action_dialog_render_icon_cb (GtkTreeViewColumn* column,
GtkWidget* treeview) GtkWidget* treeview)
{ {
KatzeItem* item; KatzeItem* item;
MidoriSearchAction* search_action;
GdkPixbuf* icon; GdkPixbuf* icon;
const gchar* icon_name; const gchar* icon_name;
gtk_tree_model_get (model, iter, 0, &item, -1); gtk_tree_model_get (model, iter, 0, &item, -1);
search_action = g_object_get_data (G_OBJECT (treeview), "search-action");
if ((icon = midori_search_action_get_icon (item, treeview, &icon_name, FALSE))) if ((icon = midori_search_action_get_icon (item, treeview, &icon_name, FALSE)))
{ {
g_object_set (renderer, "pixbuf", icon, "yalign", 0.25, NULL); g_object_set (renderer, "pixbuf", icon, "yalign", 0.25, NULL);
@ -1168,14 +1154,12 @@ static void
midori_search_action_dialog_default_cb (GtkWidget* widget, midori_search_action_dialog_default_cb (GtkWidget* widget,
MidoriSearchAction* search_action) MidoriSearchAction* search_action)
{ {
KatzeArray* search_engines;
GtkWidget* treeview; GtkWidget* treeview;
GtkTreeSelection* selection; GtkTreeSelection* selection;
GtkTreeModel* liststore; GtkTreeModel* liststore;
GtkTreeIter iter; GtkTreeIter iter;
KatzeItem* item; KatzeItem* item;
search_engines = search_action->search_engines;
treeview = search_action->treeview; treeview = search_action->treeview;
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview)); selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview));
if (gtk_tree_selection_get_selected (selection, &liststore, &iter)) if (gtk_tree_selection_get_selected (selection, &liststore, &iter))

View file

@ -337,10 +337,8 @@ midori_bookmarks_row_changed_cb (GtkTreeModel* model,
{ {
KatzeItem* item; KatzeItem* item;
GtkTreeIter parent; GtkTreeIter parent;
sqlite3* db;
gchar* parent_name; gchar* parent_name;
db = g_object_get_data (G_OBJECT (bookmarks->array), "db");
gtk_tree_model_get (model, iter, 0, &item, -1); gtk_tree_model_get (model, iter, 0, &item, -1);
if (gtk_tree_model_iter_parent (model, &parent, iter)) if (gtk_tree_model_iter_parent (model, &parent, iter))