]> spindle.queued.net Git - midori/commitdiff
Fix some compiler warnings
authorBrian Vuyk <brian@brianvuyk.com>
Wed, 12 Nov 2008 01:15:52 +0000 (02:15 +0100)
committerChristian Dywan <christian@twotoasts.de>
Wed, 12 Nov 2008 01:15:52 +0000 (02:15 +0100)
AUTHORS
midori/main.c
midori/midori-browser.c
midori/sokoke.c

diff --git a/AUTHORS b/AUTHORS
index bad5095678062c7412d2f1966019b9e884873ed0..fab8e8698848b2dbbecc7b4aa5762bd32276a36f 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -11,6 +11,7 @@ Contributors:
     Dale Whittaker <dayul@users.sf.net>
     Anders F Björklund <afb@macports.org>
     Alexander Hesse <alex@phicode.de>
+    Brian Vuyk <brian@brianvuyk.com>
 
 Graphics:
     extension: Nancy Runge <nancy@twotoasts.de>
index 7ff822379a21f3eaf8bb5dddb2fff29eaf2cf0aa..8130ec09d71106ce7963c2833b8c40b86067a578 100644 (file)
@@ -788,7 +788,7 @@ midori_history_add_items (void*  data,
                 {
                     parent = katze_array_get_nth_item (array, j);
                     newdate = katze_item_get_added (KATZE_ITEM (parent));
-                    if (sokoke_same_day (&date, &newdate))
+                    if (sokoke_same_day ((time_t *)&date, (time_t *)&newdate))
                         break;
                 }
                 if (j == n)
index e0a7e7ed6ed28a6985f940c1971eb0fddf2c1b30..68ecac19b6539301a9488fe6419ef11899fa6c5c 100644 (file)
@@ -2914,8 +2914,7 @@ gtk_notebook_switch_page_cb (GtkWidget*       notebook,
         midori_view_get_icon (MIDORI_VIEW (view)));
 
     title = midori_view_get_display_title (MIDORI_VIEW (view));
-    window_title = g_strconcat (title, " - ",
-                                g_get_application_name (), NULL);
+    window_title = g_strconcat (title, " - ", g_get_application_name (), NULL);
     gtk_window_set_title (GTK_WINDOW (browser), window_title);
     g_free (window_title);
 
@@ -3470,7 +3469,7 @@ _tree_store_insert_history_item (GtkTreeStore* treestore,
         if ((date = katze_item_get_added (item)))
         {
             now = time (NULL);
-            age = sokoke_days_between (&date, &now);
+            age = sokoke_days_between ((time_t *)&date, (time_t *)&now);
             gtk_tree_store_insert_with_values (treestore, &iter, parent,
                                                0, 0, item, 1, age, -1);
             g_object_unref (item);
@@ -3523,7 +3522,7 @@ midori_browser_new_history_item (MidoriBrowser* browser,
         gtk_tree_model_get (treemodel, &iter, 0, &parent, 1, &age, -1);
         date = katze_item_get_added (KATZE_ITEM (parent));
         date_ = (time_t)date;
-        newage = sokoke_days_between (&date, &now);
+        newage = sokoke_days_between ((time_t *)&date, (time_t *)&now);
         if (newage == 0)
         {
             found = TRUE;
index 5310cf4c1566c133b377f98e68f79d7eb2299d33..33381986366238e791e3b9164375f74695f7180b 100644 (file)
@@ -29,7 +29,7 @@ error_dialog (const gchar* short_message,
               const gchar* detailed_message)
 {
     GtkWidget* dialog = gtk_message_dialog_new (
-            NULL, 0, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, short_message);
+        NULL, 0, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, "%s", short_message);
     gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
                                               "%s", detailed_message);
     gtk_widget_show (dialog);
@@ -94,8 +94,8 @@ sokoke_magic_uri (const gchar* uri,
     KatzeItem* item;
 
     g_return_val_if_fail (uri, NULL);
-    if (search_engines)
-        g_return_val_if_fail (katze_array_is_a (search_engines, KATZE_TYPE_ITEM), NULL);
+    g_return_val_if_fail (!search_engines ||
+        katze_array_is_a (search_engines, KATZE_TYPE_ITEM), NULL);
 
     /* Add file:// if we have a local path */
     if (g_path_is_absolute (uri))