]> spindle.queued.net Git - midori/commitdiff
Fix GCC 4.6 warnings about set but unused variables
authorPaweł Forysiuk <tuxator@o2.pl>
Fri, 29 Apr 2011 01:41:04 +0000 (03:41 +0200)
committerChristian Dywan <christian@twotoasts.de>
Fri, 29 Apr 2011 02:03:33 +0000 (04:03 +0200)
extensions/adblock.c
extensions/feed-panel/feed-panel.c
katze/katze-arrayaction.c
katze/katze-scrolled.c
midori/main.c
midori/midori-array.c
midori/midori-browser.c
midori/midori-searchaction.c
panels/midori-bookmarks.c

index 00055b2c8c0296b1e0bd581db4df702db6856794..acc74a2febfa3f4714e085d147f599a8aa5d039c 100644 (file)
@@ -1221,10 +1221,10 @@ adblock_frame_add_private (const gchar* line,
     if (strchr (data[0], ','))
     {
         gchar** domains;
-        gint max, i;
+        gint i;
 
         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'",
                 blockcssprivate, g_strstrip (domains[i]), data[1]);
index efc881c9f5ec49bc8bf301e0d0ad43aff43a93d2..760dab693172ce15dc70ed27d7418fa73fc80c19 100644 (file)
@@ -430,11 +430,8 @@ feed_panel_popup_item (GtkWidget*     menu,
                        gpointer       callback,
                        FeedPanel*     panel)
 {
-    const gchar* uri;
     GtkWidget* menuitem;
 
-    uri = katze_item_get_uri (item);
-
     menuitem = gtk_image_menu_item_new_from_stock (stock_id, NULL);
     if (label)
         gtk_label_set_text_with_mnemonic (GTK_LABEL (gtk_bin_get_child (
index d448ba65d7bf346ac793afdcabf7c62febcf5a04..1f9af0f52798824c731dcac2739b51423d33f698 100644 (file)
@@ -551,7 +551,6 @@ katze_array_action_item_notify_cb (KatzeItem*   item,
                                    GParamSpec*  pspec,
                                    GtkToolItem* toolitem)
 {
-    KatzeArrayAction* array_action;
     const gchar* property;
     const gchar* title;
     const gchar* desc;
@@ -561,8 +560,6 @@ katze_array_action_item_notify_cb (KatzeItem*   item,
     if (!G_IS_PARAM_SPEC_STRING (pspec))
         return;
 
-    array_action = (KatzeArrayAction*)g_object_get_data (
-        G_OBJECT (toolitem), "KatzeArrayAction");
     property = g_param_spec_get_name (pspec);
     if (!strcmp (property, "name"))
     {
index 6d2109d6ac8340e4deeb6aa4cb33fd6c10df1d1c..d9ed5ad975f31882da55ab175eb348b6b911f21a 100644 (file)
@@ -311,13 +311,12 @@ do_timeout_scroll (KatzeScrolled* scrolled)
     GtkScrolledWindow* gtk_scrolled = GTK_SCROLLED_WINDOW (scrolled);
     GtkAdjustment* hadjustment;
     GtkAdjustment* vadjustment;
-    gdouble hpage_size, hupper, hlower, hvalue, new_hvalue;
-    gdouble vpage_size, vupper, vlower, vvalue, new_vvalue;
+    gdouble hpage_size, hupper, hvalue, new_hvalue;
+    gdouble vpage_size, vupper, vvalue, new_vvalue;
 
     hadjustment = gtk_scrolled_window_get_hadjustment (gtk_scrolled);
     hpage_size = gtk_adjustment_get_page_size (hadjustment);
     hupper = gtk_adjustment_get_upper (hadjustment);
-    hlower = gtk_adjustment_get_lower (hadjustment);
     hvalue = gtk_adjustment_get_value (hadjustment);
     new_hvalue = calculate_timeout_scroll_values (hvalue,
         hupper - hpage_size,
@@ -329,7 +328,6 @@ do_timeout_scroll (KatzeScrolled* scrolled)
     vadjustment = gtk_scrolled_window_get_vadjustment (gtk_scrolled);
     vpage_size = gtk_adjustment_get_page_size (vadjustment);
     vupper = gtk_adjustment_get_upper (vadjustment);
-    vlower = gtk_adjustment_get_lower (vadjustment);
     vvalue = gtk_adjustment_get_value (vadjustment);
     new_vvalue = calculate_timeout_scroll_values (vvalue,
         vupper - vpage_size,
index e95fca28e664ca90359431e33c7f9ad0844fc081..0eba309d34f7ed333e7804c9b1703dab80a28517 100644 (file)
@@ -1536,12 +1536,11 @@ snapshot_load_finished_cb (GtkWidget*      web_view,
 {
     GError* error;
     GtkPrintOperation* operation = gtk_print_operation_new ();
-    GtkPrintOperationAction action = GTK_PRINT_OPERATION_ACTION_EXPORT;
-    GtkPrintOperationResult result;
 
     gtk_print_operation_set_export_filename (operation, filename);
     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)
     {
index c64947158b58a7847a909b209dad6475bba34df5..e6194aa32c24e07ae6320d18b615215c4e1ec7df 100644 (file)
@@ -703,12 +703,10 @@ static void
 string_append_item (GString*   string,
                     KatzeItem* item)
 {
-    gchar* markup;
     gchar* metadata;
 
     g_return_if_fail (KATZE_IS_ITEM (item));
 
-    markup = NULL;
     metadata = katze_item_metadata_to_xbel (item);
     if (KATZE_IS_ARRAY (item))
     {
index 345dda6bb768d64cf6787a2eb473b1454d04dc2d..e74246be4e050267230bf6cab8bbf7ce1d760db7 100644 (file)
@@ -599,10 +599,8 @@ midori_view_notify_title_cb (GtkWidget*     widget,
                              MidoriBrowser* browser)
 {
     MidoriView* view = MIDORI_VIEW (widget);
-    const gchar* uri;
     const gchar* title;
 
-    uri = midori_view_get_display_uri (view);
     title = midori_view_get_display_title (view);
 
     if (midori_view_get_load_status (view) == MIDORI_LOAD_COMMITTED)
@@ -832,7 +830,7 @@ midori_browser_edit_bookmark_dialog_new (MidoriBrowser* browser,
     {
         GtkListStore* model;
         GtkCellRenderer* renderer;
-        guint i, n;
+        guint n;
         sqlite3_stmt* statement;
         gint result;
         const gchar* sqlcmd;
@@ -852,7 +850,6 @@ midori_browser_edit_bookmark_dialog_new (MidoriBrowser* browser,
             0, _("Toplevel folder"), 1, PANGO_ELLIPSIZE_END, -1);
         gtk_combo_box_set_active (GTK_COMBO_BOX (combo_folder), 0);
 
-        i = 0;
         n = 1;
         sqlcmd = "SELECT title from bookmarks where uri=''";
         result = sqlite3_prepare_v2 (db, sqlcmd, -1, &statement, NULL);
@@ -1496,12 +1493,10 @@ midori_browser_tab_destroy_cb (GtkWidget*     widget,
                                MidoriBrowser* browser)
 {
     KatzeItem* item;
-    const gchar* uri;
 
     if (browser->proxy_array && MIDORI_IS_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)))
             katze_array_add_item (browser->trash, item);
         katze_array_remove_item (browser->proxy_array, item);
@@ -4401,7 +4396,6 @@ _action_clear_private_data_activate (GtkAction*     action,
     {
         GtkWidget* content_area;
         GdkScreen* screen;
-        GtkIconTheme* icon_theme;
         GtkSizeGroup* sizegroup;
         GtkWidget* hbox;
         GtkWidget* alignment;
@@ -4426,7 +4420,6 @@ _action_clear_private_data_activate (GtkAction*     action,
         screen = gtk_widget_get_screen (GTK_WIDGET (browser));
         if (screen)
         {
-            icon_theme = gtk_icon_theme_get_for_screen (screen);
             gtk_window_set_icon_name (GTK_WINDOW (dialog), GTK_STOCK_CLEAR);
         }
         sizegroup = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
@@ -5617,9 +5610,6 @@ static void
 midori_browser_set_history (MidoriBrowser* browser,
                             KatzeArray*    history)
 {
-    time_t now;
-    gint64 day;
-
     if (browser->history == history)
         return;
 
@@ -5638,9 +5628,6 @@ midori_browser_set_history (MidoriBrowser* browser,
     g_signal_connect (browser->history, "clear",
                       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",
                   browser->history, NULL);
 }
index 34d837438cdf5ccc30bee308d4215ae367060612..279ddb0d41617aa51137d50a00e4763905a6be8d 100644 (file)
@@ -674,8 +674,6 @@ midori_search_action_set_search_engines (MidoriSearchAction* search_action,
                                          KatzeArray*         search_engines)
 {
     GSList* proxies;
-    GtkWidget* alignment;
-    GtkWidget* entry;
 
     g_return_if_fail (MIDORI_IS_SEARCH_ACTION (search_action));
     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));
     if (!proxies)
         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*
@@ -824,13 +812,11 @@ midori_search_action_dialog_render_icon_cb (GtkTreeViewColumn* column,
                                             GtkWidget*         treeview)
 {
     KatzeItem* item;
-    MidoriSearchAction* search_action;
     GdkPixbuf* icon;
     const gchar* icon_name;
 
     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)))
     {
         g_object_set (renderer, "pixbuf", icon, "yalign", 0.25, NULL);
@@ -1168,14 +1154,12 @@ static void
 midori_search_action_dialog_default_cb (GtkWidget*          widget,
                                         MidoriSearchAction* search_action)
 {
-    KatzeArray* search_engines;
     GtkWidget* treeview;
     GtkTreeSelection* selection;
     GtkTreeModel* liststore;
     GtkTreeIter iter;
     KatzeItem* item;
 
-    search_engines = search_action->search_engines;
     treeview = search_action->treeview;
     selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview));
     if (gtk_tree_selection_get_selected (selection, &liststore, &iter))
index adfe2cf97964944d900ee29d245f3c582fb831f2..680fef64566dc64ba8adf9d2f6ea4166ad13c0cb 100644 (file)
@@ -337,10 +337,8 @@ midori_bookmarks_row_changed_cb (GtkTreeModel*    model,
 {
     KatzeItem* item;
     GtkTreeIter parent;
-    sqlite3* db;
     gchar* parent_name;
 
-    db = g_object_get_data (G_OBJECT (bookmarks->array), "db");
     gtk_tree_model_get (model, iter, 0, &item, -1);
 
     if (gtk_tree_model_iter_parent (model, &parent, iter))