From 0b16997f1abca4b32a188a122bc24ba27ca2a9fc Mon Sep 17 00:00:00 2001 From: Brian Vuyk Date: Wed, 12 Nov 2008 02:15:52 +0100 Subject: [PATCH] Fix some compiler warnings --- AUTHORS | 1 + midori/main.c | 2 +- midori/midori-browser.c | 7 +++---- midori/sokoke.c | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/AUTHORS b/AUTHORS index bad50956..fab8e869 100644 --- a/AUTHORS +++ b/AUTHORS @@ -11,6 +11,7 @@ Contributors: Dale Whittaker Anders F Björklund Alexander Hesse + Brian Vuyk Graphics: extension: Nancy Runge diff --git a/midori/main.c b/midori/main.c index 7ff82237..8130ec09 100644 --- a/midori/main.c +++ b/midori/main.c @@ -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) diff --git a/midori/midori-browser.c b/midori/midori-browser.c index e0a7e7ed..68ecac19 100644 --- a/midori/midori-browser.c +++ b/midori/midori-browser.c @@ -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; diff --git a/midori/sokoke.c b/midori/sokoke.c index 5310cf4c..33381986 100644 --- a/midori/sokoke.c +++ b/midori/sokoke.c @@ -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)) -- 2.39.5