[Commits] action.c 1.12.2.74 1.12.2.75 addrbook.c 1.22.2.29 1.22.2.30 addrclip.c 1.5.2.12 1.5.2.13 addrcustomattr.c 1.1.2.12 1.1.2.13 addressbook.c 1.60.2.150 1.60.2.151 msgcache.c 1.16.2.72 1.16.2.73 textview.c 1.96.2.248 1.96.2.249 toolbar.c 1.43.2.130 1.43.2.131

mones at claws-mail.org mones at claws-mail.org
Wed Sep 19 14:22:26 CEST 2012


Update of /home/claws-mail/claws/src
In directory srv:/tmp/cvs-serv4469/src

Modified Files:
      Tag: gtk2
	action.c addrbook.c addrclip.c addrcustomattr.c addressbook.c 
	msgcache.c textview.c toolbar.c 
Log Message:
2012-09-19 [mones]	3.8.1cvs62

	* src/action.c
		Use unused var c to check result and emit messages on error
	* src/addrbook.c
		Remove unused vars: attr (several functions), element
	* src/addrclip.c
		Use unused var newGroup to check result
	* src/addrcustomattr.c
		Remove unused var summaryview and related code
	* src/addressbook.c
		Use unused vars nn, newNode, idleID to check result
		Remove unused var aoType and refactor logic around it
		Comment var enabled and related debug code
	* src/msgcache.c
		Use unused var error to check result and emit debug messages
	* src/textview.c
		Remove unused var link_color
	* src/toolbar.c
		Remove unused vars: attr, retVal 

Index: addrcustomattr.c
===================================================================
RCS file: /home/claws-mail/claws/src/Attic/addrcustomattr.c,v
retrieving revision 1.1.2.12
retrieving revision 1.1.2.13
diff -u -d -r1.1.2.12 -r1.1.2.13
--- addrcustomattr.c	7 Jul 2012 07:09:26 -0000	1.1.2.12
+++ addrcustomattr.c	19 Sep 2012 12:22:24 -0000	1.1.2.13
@@ -324,10 +324,6 @@
 {
 	GtkTreeIter iter;
 	GtkTreeModel *model = gtk_tree_view_get_model(GTK_TREE_VIEW(list_view));
-	SummaryView *summaryview = NULL;
-
-	if (mainwindow_get_mainwindow() != NULL)
-		summaryview = mainwindow_get_mainwindow()->summaryview;
 
 	if (!gtk_tree_model_get_iter_from_string(model, &iter, path))
 		return;

Index: toolbar.c
===================================================================
RCS file: /home/claws-mail/claws/src/toolbar.c,v
retrieving revision 1.43.2.130
retrieving revision 1.43.2.131
diff -u -d -r1.43.2.130 -r1.43.2.131
--- toolbar.c	8 Sep 2012 20:23:11 -0000	1.43.2.130
+++ toolbar.c	19 Sep 2012 12:22:24 -0000	1.43.2.131
@@ -705,8 +705,6 @@
 {
 	XMLFile *file   = NULL;
 	gchar *fileSpec = NULL;
-	GList *attr;
-	gboolean retVal;
 	jmp_buf    jumper;
 
 	debug_print("read Toolbar Configuration from %s\n", toolbar_config[source].conf_file);
@@ -726,9 +724,6 @@
 			return;
 		}
 
-		attr = xml_get_current_tag_attr(file);
-		
-		retVal = TRUE;
 		for (;;) {
 			if (!file->level) 
 				break;

Index: addrclip.c
===================================================================
RCS file: /home/claws-mail/claws/src/addrclip.c,v
retrieving revision 1.5.2.12
retrieving revision 1.5.2.13
diff -u -d -r1.5.2.12 -r1.5.2.13
--- addrclip.c	27 May 2012 17:30:48 -0000	1.5.2.12
+++ addrclip.c	19 Sep 2012 12:22:24 -0000	1.5.2.13
@@ -379,6 +379,9 @@
 		node = g_list_next( node );
 		newGroup = addrclip_cache_add_group(
 				cache, newFolder, item, copyList );
+		if (newGroup == NULL) {
+			g_message("error allocating memory for new group\n");
+		}
 	}
 	g_list_free( copyList );
 

Index: action.c
===================================================================
RCS file: /home/claws-mail/claws/src/action.c,v
retrieving revision 1.12.2.74
retrieving revision 1.12.2.75
diff -u -d -r1.12.2.74 -r1.12.2.75
--- action.c	16 Sep 2012 21:56:20 -0000	1.12.2.74
+++ action.c	19 Sep 2012 12:22:24 -0000	1.12.2.75
@@ -1473,6 +1473,9 @@
 	g_source_remove(child_info->tag_status);
 
 	c = read(source, &buf, 1);
+	if (c != 1) {
+		g_message("error reading child return status\n");
+	}
 	debug_print("Child returned %c\n", buf);
 
 #ifdef G_OS_UNIX

Index: textview.c
===================================================================
RCS file: /home/claws-mail/claws/src/textview.c,v
retrieving revision 1.96.2.248
retrieving revision 1.96.2.249
diff -u -d -r1.96.2.248 -r1.96.2.249
--- textview.c	12 Sep 2012 09:23:12 -0000	1.96.2.248
+++ textview.c	19 Sep 2012 12:22:24 -0000	1.96.2.249
@@ -1685,7 +1685,6 @@
 void textview_write_link(TextView *textview, const gchar *str,
 			 const gchar *uri, CodeConverter *conv)
 {
-    	GdkColor *link_color = NULL;
 	GtkTextView *text;
 	GtkTextBuffer *buffer;
 	GtkTextIter iter;
@@ -1726,9 +1725,6 @@
 	if (bufp > buf)
 		gtk_text_buffer_insert(buffer, &iter, buf, bufp - buf);
 
-    	if (prefs_common.enable_color) {
-		link_color = &uri_color;
-    	}
 	r_uri = g_new0(ClickableText, 1);
 	r_uri->uri = g_strdup(uri);
 	r_uri->start = gtk_text_iter_get_offset(&iter);

Index: addrbook.c
===================================================================
RCS file: /home/claws-mail/claws/src/addrbook.c,v
retrieving revision 1.22.2.29
retrieving revision 1.22.2.30
diff -u -d -r1.22.2.29 -r1.22.2.30
--- addrbook.c	8 Sep 2012 20:23:09 -0000	1.22.2.29
+++ addrbook.c	19 Sep 2012 12:22:24 -0000	1.22.2.30
@@ -401,7 +401,6 @@
 static void addrbook_parse_addr_list(AddressBookFile *book, XMLFile *file, 
 				     ItemPerson *person)
 {
-	GList *attr;
 	guint prev_level;
 
 	for (;;) {
@@ -411,7 +410,6 @@
 		}
 		if (file->level < prev_level) return;
 		if (xml_compare_tag(file, AB_ELTAG_ADDRESS)) {
-			attr = xml_get_current_tag_attr(file);
 			addrbook_parse_address(book, file, person);
 			addrbook_parse_addr_list(book, file, person);
 		}
@@ -467,7 +465,6 @@
 static void addrbook_parse_attr_list(AddressBookFile *book, XMLFile *file, 
 				     ItemPerson *person)
 {
-	GList *attr;
 	guint prev_level;
 
 	for (;;) {
@@ -477,7 +474,6 @@
 		}
 		if (file->level < prev_level) return;
 		if (xml_compare_tag(file, AB_ELTAG_ATTRIBUTE)) {
-			attr = xml_get_current_tag_attr(file);
 			addrbook_parse_attribute(file, person);
 			addrbook_parse_attr_list(book, file, person);
 		}
@@ -579,7 +575,6 @@
 static void addrbook_parse_member_list(AddressBookFile *book, XMLFile *file, 
 				       ItemGroup *group)
 {
-	GList *attr;
 	guint prev_level;
 
 	for (;;) {
@@ -590,13 +585,9 @@
 		if (file->level < prev_level)
 			return;
 		if (xml_compare_tag(file, AB_ELTAG_MEMBER)) {
-			attr = xml_get_current_tag_attr(file);
 			addrbook_parse_member(book, file, group);
 			addrbook_parse_member_list(book, file, group);
 		}
-		else {
-			attr = xml_get_current_tag_attr(file);
-		}
 	}
 }
 
@@ -674,7 +665,6 @@
 static void addrbook_parse_folder_list(AddressBookFile *book, XMLFile *file,
 				       ItemFolder *folder)
 {
-	GList *attr;
 	guint prev_level;
 
 	for (;;) {
@@ -685,13 +675,9 @@
 		if (file->level < prev_level)
 			return;
 		if (xml_compare_tag(file, AB_ELTAG_ITEM)) {
-			attr = xml_get_current_tag_attr(file);
 			addrbook_parse_folder_item(book, file, folder);
 			addrbook_parse_folder_list(book, file, folder);
 		}
-		else {
-			attr = xml_get_current_tag_attr(file);
-		}
 	}
 }
 
@@ -1924,9 +1910,10 @@
  * \param book Address book.
  * \param file XML file handle.
  */
-static void addrbook_chkparse_addr_list( AddressBookFile *book, XMLFile *file ){
+static void addrbook_chkparse_addr_list( AddressBookFile *book, XMLFile *file )
+{
 	guint prev_level;
-	GList *attr;
+	/* GList *attr; */
 
 	for (;;) {
 		prev_level = file->level;
@@ -1934,7 +1921,7 @@
 			longjmp(book->jumper, 1);
 		if (file->level < prev_level)
 			return;
-		attr = xml_get_current_tag_attr(file);
+		/* attr = xml_get_current_tag_attr(file); */
 		/* addrbook_show_attribs( attr ); */
 		if (xml_compare_tag(file, AB_ELTAG_ADDRESS))
 			addrbook_chkparse_addr_list(book, file);
@@ -1948,12 +1935,12 @@
  */
 static void addrbook_chkparse_attribute(AddressBookFile *book, XMLFile *file)
 {
-	GList *attr;
-	gchar *element;
+	/* GList *attr; */
+	/* gchar *element; */
 
-	attr = xml_get_current_tag_attr(file);
+	/* attr = xml_get_current_tag_attr(file); */
 	/* addrbook_show_attribs( attr ); */
-	element = xml_get_element(file);
+	/* element = xml_get_element(file); */
 	/* g_print( "\t\tattrib value : %s\n", element ); */
 }
 
@@ -1986,9 +1973,9 @@
  */
 static void addrbook_chkparse_person(AddressBookFile *book, XMLFile *file)
 {
-	GList *attr;
+	/* GList *attr; */
 
-	attr = xml_get_current_tag_attr(file);
+	/* attr = xml_get_current_tag_attr(file); */
 	/* addrbook_show_attribs( attr ); */
 	if (xml_parse_next_tag(file)) /* Consume closing tag */
 		longjmp(book->jumper, 1);
@@ -2010,7 +1997,7 @@
  */
 static void addrbook_chkparse_member_list(AddressBookFile *book, XMLFile *file)
 {
-	GList *attr;
+	/* GList *attr; */
 	guint prev_level;
 
 	for (;;) {
@@ -2022,12 +2009,12 @@
 			return;
 			
 		if (xml_compare_tag(file, AB_ELTAG_MEMBER)) {
-			attr = xml_get_current_tag_attr(file);
+			/* attr = xml_get_current_tag_attr(file); */
 			/* addrbook_show_attribs( attr ); */
 			addrbook_chkparse_member_list(book, file);
 		}
 		else {
-			attr = xml_get_current_tag_attr(file);
+			/* attr = xml_get_current_tag_attr(file); */
 			/* addrbook_show_attribs( attr ); */
 		}
 	}
@@ -2040,9 +2027,9 @@
  */
 static void addrbook_chkparse_group(AddressBookFile *book, XMLFile *file)
 {
-	GList *attr;
+	/* GList *attr; */
 
-	attr = xml_get_current_tag_attr(file);
+	/* attr = xml_get_current_tag_attr(file); */
 	/* addrbook_show_attribs( attr ); */
 	if (xml_parse_next_tag(file))	/* Consume closing tag */
 		longjmp(book->jumper, 1);
@@ -2058,7 +2045,7 @@
  */
 static void addrbook_chkparse_folder_list(AddressBookFile *book, XMLFile *file)
 {
-	GList *attr;
+	/* GList *attr; */
 	guint prev_level;
 
 	for (;;) {
@@ -2070,12 +2057,12 @@
 			return;
 			
 		if (xml_compare_tag(file, AB_ELTAG_ITEM)) {
-			attr = xml_get_current_tag_attr(file);
+			/* attr = xml_get_current_tag_attr(file); */
 			/* addrbook_show_attribs( attr ); */
 			addrbook_chkparse_folder_list(book, file);
 		}
 		else {
-			attr = xml_get_current_tag_attr(file);
+			/* attr = xml_get_current_tag_attr(file); */
 			/* addrbook_show_attribs( attr ); */
 		}
 	}
@@ -2088,9 +2075,9 @@
  */
 static void addrbook_chkparse_folder(AddressBookFile *book, XMLFile *file)
 {
-	GList *attr;
+	/* GList *attr; */
 
-	attr = xml_get_current_tag_attr(file);
+	/* attr = xml_get_current_tag_attr(file); */
 	/* addrbook_show_attribs( attr ); */
 	if (xml_parse_next_tag(file))	/* Consume closing tag */
 		longjmp(book->jumper, 1);
@@ -2106,7 +2093,7 @@
  */
 static gboolean addrbook_chkread_tree(AddressBookFile *book, XMLFile *file)
 {
-	GList *attr;
+	/* GList *attr; */
 	gboolean retVal;
 
 	if (xml_get_dtd(file))
@@ -2118,7 +2105,7 @@
 	if (!xml_compare_tag(file, AB_ELTAG_ADDRESS_BOOK))
 		return FALSE;
 
-	attr = xml_get_current_tag_attr(file);
+	/* attr = xml_get_current_tag_attr(file); */
 	/* addrbook_show_attribs( attr ); */
 
 	retVal = TRUE;

Index: msgcache.c
===================================================================
RCS file: /home/claws-mail/claws/src/msgcache.c,v
retrieving revision 1.16.2.72
retrieving revision 1.16.2.73
diff -u -d -r1.16.2.72 -r1.16.2.73
--- msgcache.c	7 Jul 2012 07:09:28 -0000	1.16.2.72
+++ msgcache.c	19 Sep 2012 12:22:24 -0000	1.16.2.73
@@ -879,6 +879,9 @@
 	}
 bail_err:
 	fclose(fp);
+	if (error) {
+		debug_print("error reading cache mark from %s\n", mark_file);
+	}
 }
 
 void msgcache_read_tags(MsgCache *cache, const gchar *tags_file)
@@ -986,6 +989,9 @@
 	}
 bail_err:
 	fclose(fp);
+	if (error) {
+		debug_print("error reading cache tags from %s\n", tags_file);
+	}
 }
 
 static int msgcache_write_cache(MsgInfo *msginfo, FILE *fp)

Index: addressbook.c
===================================================================
RCS file: /home/claws-mail/claws/src/addressbook.c,v
retrieving revision 1.60.2.150
retrieving revision 1.60.2.151
diff -u -d -r1.60.2.150 -r1.60.2.151
--- addressbook.c	12 Sep 2012 09:23:11 -0000	1.60.2.150
+++ addressbook.c	19 Sep 2012 12:22:24 -0000	1.60.2.151
@@ -2142,6 +2142,9 @@
 
 			group = ( ItemGroup * ) aio;
 			nn = addressbook_node_add_group( treeNode, ds, group );
+			if (nn == NULL) {
+				g_message("error adding addressbook group\n");
+			}
 		}
 		else if( ADDRESS_OBJECT_TYPE(aio) == ITEMTYPE_FOLDER ) {
 			ItemFolder *folder;
@@ -2149,6 +2152,9 @@
 			folder = ( ItemFolder * ) aio;
 			nn = addressbook_node_add_folder(
 				treeNode, ds, folder, ADDR_ITEM_FOLDER );
+			if (nn == NULL) {
+				g_message("error adding addressbook folder\n");
+			}
 		}
 		node = g_list_next( node );
 	}
@@ -2678,6 +2684,9 @@
 		GtkCMCTreeNode *nn;
 		nn = addressbook_node_add_folder(
 			addrbook.treeSelected, ds, folder, ADDR_ITEM_FOLDER );
+		if (nn == NULL) {
+			g_message("error adding addressbook folder\n");
+		}
 		gtk_cmctree_expand( ctree, addrbook.treeSelected );
 		if( addrbook.treeSelected == addrbook.opened )
 			addressbook_set_clist(obj, TRUE);
@@ -2715,6 +2724,9 @@
 	if( group ) {
 		GtkCMCTreeNode *nn;
 		nn = addressbook_node_add_group( addrbook.treeSelected, ds, group );
+		if (nn == NULL) {
+			g_message("error adding addressbook group\n");
+		}
 		gtk_cmctree_expand( ctree, addrbook.treeSelected );
 		if( addrbook.treeSelected == addrbook.opened )
 			addressbook_set_clist(obj, TRUE);
@@ -3978,12 +3990,14 @@
 				nodeDS = iface->listSource;
 				while( nodeDS ) {
 					ds = nodeDS->data;
-					newNode = NULL;
 					name = addrindex_ds_get_name( ds );
 					ads = addressbook_create_ds_adapter(
 							ds, atci->objectType, name );
 					newNode = addressbook_add_object(
 							node, ADDRESS_OBJECT(ads) );
+					if (newNode == NULL) {
+						g_message("error adding addressbook object\n");
+					}
 					nodeDS = g_list_next( nodeDS );
 				}
 				gtk_cmctree_expand( ctree, node );
@@ -4579,21 +4593,11 @@
 	gchar *name;
 	gint queryID;
 	guint idleID;
-#ifdef USE_LDAP
-	AddressObjectType aoType = ADDR_NONE;
-#endif
 
 	/* Setup a query */
 	if( *searchTerm == '\0' || strlen( searchTerm ) < 1 ) return;
 
-	if( ds && ds->type == ADDR_IF_LDAP ) {
-#if USE_LDAP
-		aoType = ADDR_LDAP_QUERY;
-#endif
-	}
-	else {
-		return;
-	}
+	if( !ds || ds->type != ADDR_IF_LDAP ) return;
 
 	/* Create a folder for the search results */
 	name = g_strdup_printf( _queryFolderLabel_, searchTerm );
@@ -4609,6 +4613,9 @@
 	idleID = g_idle_add(
 			(GSourceFunc) addressbook_search_idle,
 			GINT_TO_POINTER( queryID ) );
+	if (idleID == 0) {
+		g_message("error adding addressbook_search_idle\n");
+	}
 
 	/* Start search, sit back and wait for something to happen */
 	addrindex_start_search( queryID );
@@ -5076,7 +5083,7 @@
 	gint ifType;
 	gint i;
 	gchar *endptr = NULL;
-	gboolean enabled;
+	/* gboolean enabled; */
 	AdapterInterface *adapter;
 
 	selectStr = g_strdup( ADDRESSBOOK_IFACE_SELECTION );
@@ -5087,12 +5094,13 @@
 		if( splitStr[i] ) {
 			/* g_print( "%d : %s\n", i, splitStr[i] ); */
 			ifType = strtol( splitStr[i], &endptr, 10 );
-			enabled = TRUE;
+			/* enabled = TRUE;
 			if( *endptr ) {
 				if( strcmp( endptr, "/n" ) == 0 ) {
 					enabled = FALSE;
 				}
 			}
+			*/
 			/* g_print( "\t%d : %s\n", ifType, enabled ? "yes" : "no" ); */
 			adapter = addrbookctl_find_interface( ifType );
 			if( adapter ) {
@@ -5482,6 +5490,9 @@
 				newNode = addressbook_add_object(
 						adapter->treeNode,
 						ADDRESS_OBJECT(ads) );
+				if (newNode == NULL) {
+					g_message("error adding addressbook object\n");
+				}
 			}
 		}
 



More information about the Commits mailing list