[evolution-rss] fix compiler warnings



commit fc94846387f2adaadc55a7535fc6c628f7d404f2
Author: Lucian Langa <lucilanga gnome org>
Date:   Thu Jan 21 23:18:48 2010 +0200

    fix compiler warnings

 src/notification.c       |   19 ++++++++++++++-----
 src/rss-config-factory.c |    9 ++++-----
 src/rss.c                |   12 ++++++------
 3 files changed, 24 insertions(+), 16 deletions(-)
---
diff --git a/src/notification.c b/src/notification.c
index d68ddf9..0a97c3c 100644
--- a/src/notification.c
+++ b/src/notification.c
@@ -269,17 +269,26 @@ taskbar_op_new(gchar *message)
 void
 taskbar_op_set_progress(gchar *key, gchar *msg, gdouble progress)
 {
-return;
 #if (EVOLUTION_VERSION < 22900) //kb//
-	EActivityHandler *activity_handler = mail_component_peek_activity_handler (mail_component_peek ());
-	guint activity_id = GPOINTER_TO_INT(g_hash_table_lookup(rf->activity, key));
+	EActivityHandler *activity_handler;
+	guint activity_id;
+#else
+	EActivity *activity_id;
+#endif
+
+#if (EVOLUTION_VERSION < 22900) //kb//
+	activity_handler = mail_component_peek_activity_handler
+				(mail_component_peek ());
+	activity_id = GPOINTER_TO_INT(
+				g_hash_table_lookup(rf->activity, key));
 #else
-	EActivity *activity_id = g_hash_table_lookup(rf->activity, key);
+	activity_id = g_hash_table_lookup(rf->activity, key);
 #endif
 
 	if (activity_id) {
 #if (EVOLUTION_VERSION < 22900) //kb//
-		e_activity_handler_operation_progressing(activity_handler,
+		e_activity_handler_operation_progressing(
+				activity_handler,
 				activity_id,
                                 g_strdup(msg),
                                 progress);
diff --git a/src/rss-config-factory.c b/src/rss-config-factory.c
index 30389bd..4529078 100644
--- a/src/rss-config-factory.c
+++ b/src/rss-config-factory.c
@@ -1268,7 +1268,6 @@ import_one_feed(gchar *url, gchar *title, gchar *prefix)
                                      feed->feed_url)) {
                rss_error(NULL, feed->feed_name, _("Error adding feed."),
                                 _("Feed already exists!"));
-               return FALSE;
         }
 	setup_feed(feed);
 }
@@ -1315,7 +1314,7 @@ import_opml(gchar *file)
         guint current = 0;
 	guint type = 0; //file type
         gchar *what = NULL;
-	gchar *msg, *tmp, *maintitle;
+	gchar *msg, *tmp, *maintitle = NULL;
         GtkWidget *import_dialog = NULL;
         GtkWidget *import_label;
         GtkWidget *import_progress;
@@ -1418,14 +1417,14 @@ import_opml(gchar *file)
 
 	if (type == 0) {
 	gint size = 0;
-	gchar *base = NULL, *start = NULL, *root = NULL, *last = NULL;
+	gchar *base = NULL, *root = NULL, *last = NULL;
 	gchar *rssprefix = NULL;
 	/* need to automate this, not just guess title at random */
 	src=src->children;
 	src = src->children;
 	src = src->next;
 	src = src->children;
-	maintitle = layer_find(src, "title", NULL);
+	maintitle = (gchar *)layer_find(src, "title", NULL);
 	while (src) {
 		gchar *rssurl = NULL, *rsstitle = NULL;
 		if (rf->cancel) {
@@ -2418,7 +2417,7 @@ void rss_folder_factory_commit (EPlugin *epl, EConfigTarget *target)
 	GtkWidget *ttl_value, *feed_name_entry;
 	GtkWidget *authuser, *authpass, *useauth;
 	gchar *feed_name;
-	gboolean fhtml, auth_enabled, found;
+	gboolean fhtml, auth_enabled;
 	guint i=0;
 	gchar *key = NULL;
 
diff --git a/src/rss.c b/src/rss.c
index f6b5874..d81628a 100644
--- a/src/rss.c
+++ b/src/rss.c
@@ -204,9 +204,9 @@ SoupCookieJar *rss_soup_jar;
 #endif
 extern guint rsserror;
 gboolean single_pending = FALSE;
-#if EVOLUTION_VERSION >= 22900
-extern CamelSession *session;
-#endif
+//#if EVOLUTION_VERSION >= 22900
+//extern CamelSession *session;
+//#endif
 
 rssfeed *rf = NULL;
 guint           upgrade = 0;                // set to 2 when initailization successfull
@@ -2670,7 +2670,7 @@ finish_setup_feed(SoupSession *soup_sess, SoupMessage *msg, add_feed *user_data)
 	gchar *real_name, *rssurl, *tmpkey, *ver;
 	xmlDocPtr doc = NULL;
 	xmlNodePtr root = NULL;
-	gpointer crc_feed;
+	gpointer crc_feed = NULL;
 	gchar *tmsgkey;
 	GError *err = NULL;
 	gchar *tmsg = feed->tmsg;
@@ -4102,7 +4102,7 @@ custom_update_articles(CDATA *cdata)
 		network_timeout();
 		// check if we're enabled and no cancelation signal pending
 		// and no imports pending
-		dp("cdata->key:%s\n", cdata->key);
+		dp("cdata->key:%s\n", (gchar *)cdata->key);
 		if (g_hash_table_lookup(rf->hre, lookup_key(cdata->key)) && !rf->cancel && !rf->import) {
 			d("\nFetching: %s..%s\n",
 				(char *)g_hash_table_lookup(rf->hr, lookup_key(cdata->key)), (char *)cdata->key);
@@ -5312,8 +5312,8 @@ display_folder_icon(GtkTreeStore *tree_store, gchar *key)
 		si = em_folder_tree_model_lookup_store_info (
 			EM_FOLDER_TREE_MODEL (mod), store);
 #endif
-dp("full_name:%s\n", full_name);
 		row = g_hash_table_lookup (si->full_hash, full_name);
+		if (!row) goto out;
 		path = gtk_tree_row_reference_get_path (row);
 		gtk_tree_model_get_iter ((GtkTreeModel *)tree_store, &iter, path);
 		gtk_tree_path_free (path);



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