[libslab] Fix compile-time warnings



commit ab537f93398e5e407a288b9b149b423f31ec5d82
Author: Bastien Nocera <hadess hadess net>
Date:   Wed Mar 10 12:06:13 2010 +0000

    Fix compile-time warnings

 libslab/app-shell.c      |    2 ++
 libslab/bookmark-agent.c |    4 +---
 libslab/shell-window.c   |    1 -
 3 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/libslab/app-shell.c b/libslab/app-shell.c
index daabc4f..1f4eb8b 100644
--- a/libslab/app-shell.c
+++ b/libslab/app-shell.c
@@ -871,6 +871,8 @@ generate_categories (AppShellData * app_data)
 	root_dir = gmenu_tree_get_root_directory (app_data->tree);
 	if (root_dir)
 		contents = gmenu_tree_directory_get_contents (root_dir);
+	else
+		contents = NULL;
 	if (!root_dir || !contents)
 	{
 		GtkWidget *dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_DESTROY_WITH_PARENT,
diff --git a/libslab/bookmark-agent.c b/libslab/bookmark-agent.c
index 8be315d..57932c2 100644
--- a/libslab/bookmark-agent.c
+++ b/libslab/bookmark-agent.c
@@ -224,8 +224,6 @@ bookmark_agent_purge_items (BookmarkAgent *this)
 {
 	BookmarkAgentPrivate *priv = PRIVATE (this);
 
-	gint rank;
-
 	GError *error = NULL;
 
 	gchar **uris = NULL;
@@ -1167,7 +1165,7 @@ create_dir_item (BookmarkAgent *this, const gchar *uri)
 
 	if (! strcmp (uri, "HOME")) {
 		uri_new = g_filename_to_uri (g_get_home_dir (), NULL, NULL);
-		name    = C_("Home folder", "Home");
+		name    = g_strdup (C_("Home folder", "Home"));
 		icon    = "user-home";
 	}
 	else if (! strcmp (uri, "DOCUMENTS")) {
diff --git a/libslab/shell-window.c b/libslab/shell-window.c
index 5202229..23656a5 100644
--- a/libslab/shell-window.c
+++ b/libslab/shell-window.c
@@ -26,7 +26,6 @@
 
 static void shell_window_class_init (ShellWindowClass *);
 static void shell_window_init (ShellWindow *);
-static void shell_window_destroy (GtkObject *);
 static void shell_window_handle_size_request (GtkWidget * widget, GtkRequisition * requisition,
 	AppShellData * data);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]