]> spindle.queued.net Git - midori/commitdiff
Fix shadow and missing initialisation warnings
authorChristian Dywan <christian@twotoasts.de>
Tue, 8 Mar 2011 18:56:48 +0000 (19:56 +0100)
committerChristian Dywan <christian@twotoasts.de>
Tue, 8 Mar 2011 20:03:01 +0000 (21:03 +0100)
midori/midori-browser.c
toolbars/midori-transferbar.c

index d4dce14e77e728a5e233a0fd393dbdb1bccb7f3a..44b9cdb4e28dd8f03c881c0b8da029a703a5392d 100644 (file)
@@ -4827,8 +4827,8 @@ static void
 midori_browser_switch_tab_cb (GtkWidget*     menuitem,
                               MidoriBrowser* browser)
 {
-    gint index = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (menuitem), "index"));
-    midori_browser_set_current_page (browser, index);
+    gint page = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (menuitem), "index"));
+    midori_browser_set_current_page (browser, page);
 }
 
 static gboolean
@@ -4856,7 +4856,7 @@ midori_browser_notebook_button_press_event_after_cb (GtkNotebook*    notebook,
         GList* tabs = gtk_container_get_children (GTK_CONTAINER (notebook));
         GtkWidget* menuitem = sokoke_action_create_popup_menu_item (
             gtk_action_group_get_action (browser->action_group, "TabNew"));
-        gint i;
+        gint i = 0;
         gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);
         menuitem = sokoke_action_create_popup_menu_item (
             gtk_action_group_get_action (browser->action_group, "UndoTabClose"));
index 7a67e252b20d3b973409da1eca3e5bd7f5b49407..06d2f6db1846cce49b817137747d71614b73fb85 100644 (file)
@@ -82,7 +82,7 @@ midori_transferbar_download_notify_progress_cb (WebKitDownload* download,
     gchar* transfer;
     gdouble* last_time;
     guint64* last_size;
-    gdouble time;
+    gdouble timestamp;
     guint64 size;
 
     gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (progress),
@@ -92,18 +92,18 @@ midori_transferbar_download_notify_progress_cb (WebKitDownload* download,
     total = g_format_size_for_display (webkit_download_get_total_size (download));
     last_time = g_object_get_data (G_OBJECT (download), "last-time");
     last_size = g_object_get_data (G_OBJECT (download), "last-size");
-    time = webkit_download_get_elapsed_time (download);
+    timestamp = webkit_download_get_elapsed_time (download);
     size = webkit_download_get_current_size (download);
-    if (time != *last_time)
-        transfer = g_format_size_for_display ((size - *last_size) / (time - *last_time));
+    if (timestamp != *last_time)
+        transfer = g_format_size_for_display ((size - *last_size) / (timestamp - *last_time));
     else
         /* i18n: Unknown number of bytes, used for transfer rate like ?B/s */
         transfer = g_strdup (_("?B"));
     /* i18n: Download tooltip, 4KB of 43MB, 130KB/s */
     size_text = g_strdup_printf (_("%s of %s, %s/s"), current, total, transfer);
-    if (time - *last_time > 5.0)
+    if (timestamp - *last_time > 5.0)
     {
-        *last_time = time;
+        *last_time = timestamp;
         *last_size = size;
     }
     g_free (current);