[Commits] addrindex.c 1.28.2.50 1.28.2.51 editaddress.c 1.14.2.64 1.14.2.65 editldap.c 1.8.2.46 1.8.2.47 exporthtml.c 1.5.2.32 1.5.2.33 jpilot.c 1.18.2.36 1.18.2.37 procmime.c 1.49.2.150 1.49.2.151
colin at claws-mail.org
colin at claws-mail.org
Wed Sep 19 17:14:01 CEST 2012
Update of /home/claws-mail/claws/src
In directory srv:/tmp/cvs-serv32521/src
Modified Files:
Tag: gtk2
addrindex.c editaddress.c editldap.c exporthtml.c jpilot.c
procmime.c
Log Message:
2012-09-19 [colin] 3.8.1cvs65
* src/addrindex.c
* src/editaddress.c
* src/editldap.c
* src/exporthtml.c
* src/jpilot.c
* src/procmime.c
* src/plugins/bogofilter/bogofilter_gtk.c
* src/plugins/pgpcore/prefs_gpg.c
* src/plugins/smime/smime.c
* src/plugins/spamassassin/spamassassin_gtk.c
More warning fixes, casts, useless variables and
unchecked return values
Index: exporthtml.c
===================================================================
RCS file: /home/claws-mail/claws/src/exporthtml.c,v
retrieving revision 1.5.2.32
retrieving revision 1.5.2.33
diff -u -d -r1.5.2.32 -r1.5.2.33
--- exporthtml.c 7 Jul 2012 07:09:27 -0000 1.5.2.32
+++ exporthtml.c 19 Sep 2012 15:13:59 -0000 1.5.2.33
@@ -874,7 +874,7 @@
const GList *node;
GList *listHeir, *list;
const gchar *name;
- gboolean ret1, ret2;
+ gboolean ret1;
name = ADDRITEM_NAME( folder );
if( name ) {
@@ -889,7 +889,7 @@
}
ret1 = exporthtml_fmt_person( ctl, stream, folder );
- ret2 = exporthtml_fmt_group( ctl, stream, folder, ret1 );
+ exporthtml_fmt_group( ctl, stream, folder, ret1 );
node = list = exporthtml_sort_name( folder->listFolder );
while( node ) {
Index: editldap.c
===================================================================
RCS file: /home/claws-mail/claws/src/editldap.c,v
retrieving revision 1.8.2.46
retrieving revision 1.8.2.47
diff -u -d -r1.8.2.46 -r1.8.2.47
--- editldap.c 7 Jul 2012 07:09:27 -0000 1.8.2.46
+++ editldap.c 19 Sep 2012 15:13:59 -0000 1.8.2.47
@@ -460,7 +460,7 @@
gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
hbox_spin = gtk_hbox_new (FALSE, 8);
- spinbtn_port_adj = gtk_adjustment_new (389, 1, 65535, 1, 1000, 0);
+ spinbtn_port_adj = GTK_ADJUSTMENT(gtk_adjustment_new (389, 1, 65535, 1, 1000, 0));
spinbtn_port = gtk_spin_button_new(GTK_ADJUSTMENT (spinbtn_port_adj), 1, 0);
gtk_box_pack_start (GTK_BOX (hbox_spin), spinbtn_port, TRUE, FALSE, 0);
gtk_widget_set_size_request (spinbtn_port, 64, -1);
@@ -602,8 +602,8 @@
gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
hbox_spin = gtk_hbox_new (FALSE, 8);
- spinbtn_queryage_adj = gtk_adjustment_new(
- LDAPCTL_DFL_QUERY_AGE, 1, LDAPCTL_MAX_QUERY_AGE, 10, 1000, 0 );
+ spinbtn_queryage_adj = GTK_ADJUSTMENT(gtk_adjustment_new(
+ LDAPCTL_DFL_QUERY_AGE, 1, LDAPCTL_MAX_QUERY_AGE, 10, 1000, 0 ));
spinbtn_queryage = gtk_spin_button_new(GTK_ADJUSTMENT (spinbtn_queryage_adj), 1, 0);
gtk_box_pack_start (GTK_BOX (hbox_spin), spinbtn_queryage, FALSE, FALSE, 0);
gtk_widget_set_size_request (spinbtn_queryage, 64, -1);
@@ -738,7 +738,7 @@
gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
hbox_spin = gtk_hbox_new (FALSE, 8);
- spinbtn_timeout_adj = gtk_adjustment_new (0, 0, 300, 1, 10, 0);
+ spinbtn_timeout_adj = GTK_ADJUSTMENT(gtk_adjustment_new (0, 0, 300, 1, 10, 0));
spinbtn_timeout = gtk_spin_button_new(GTK_ADJUSTMENT (spinbtn_timeout_adj), 1, 0);
gtk_box_pack_start (GTK_BOX (hbox_spin), spinbtn_timeout, FALSE, FALSE, 0);
gtk_widget_set_size_request (spinbtn_timeout, 64, -1);
@@ -756,7 +756,7 @@
gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
hbox_spin = gtk_hbox_new (FALSE, 8);
- spinbtn_maxentry_adj = gtk_adjustment_new (0, 0, 500, 1, 10, 0);
+ spinbtn_maxentry_adj = GTK_ADJUSTMENT(gtk_adjustment_new (0, 0, 500, 1, 10, 0));
spinbtn_maxentry = gtk_spin_button_new(GTK_ADJUSTMENT (spinbtn_maxentry_adj), 1, 0);
gtk_box_pack_start (GTK_BOX (hbox_spin), spinbtn_maxentry, FALSE, FALSE, 0);
gtk_widget_set_size_request (spinbtn_maxentry, 64, -1);
Index: editaddress.c
===================================================================
RCS file: /home/claws-mail/claws/src/editaddress.c,v
retrieving revision 1.14.2.64
retrieving revision 1.14.2.65
diff -u -d -r1.14.2.64 -r1.14.2.65
--- editaddress.c 8 Sep 2012 20:23:10 -0000 1.14.2.64
+++ editaddress.c 19 Sep 2012 15:13:59 -0000 1.14.2.65
@@ -884,7 +884,6 @@
GtkWidget *entry_nn;
const gchar *locale;
gint top = 0;
- GtkActionGroup *action_group;
vbox = gtk_vbox_new( FALSE, 20 );
hbox = gtk_hbox_new( FALSE, 8 );
@@ -892,7 +891,7 @@
gtk_widget_show( vbox );
if (!editaddr_popup_menu) {
- action_group = cm_menu_create_action_group("EditAddressPopup", editaddr_popup_entries,
+ cm_menu_create_action_group("EditAddressPopup", editaddr_popup_entries,
G_N_ELEMENTS(editaddr_popup_entries), (gpointer)NULL);
MENUITEM_ADDUI("/Menus", "EditAddressPopup", "EditAddressPopup", GTK_UI_MANAGER_MENU)
MENUITEM_ADDUI("/Menus/EditAddressPopup", "SetPicture", "EditAddressPopup/SetPicture", GTK_UI_MANAGER_MENUITEM)
Index: addrindex.c
===================================================================
RCS file: /home/claws-mail/claws/src/addrindex.c,v
retrieving revision 1.28.2.50
retrieving revision 1.28.2.51
diff -u -d -r1.28.2.50 -r1.28.2.51
--- addrindex.c 12 Sep 2012 09:23:11 -0000 1.28.2.50
+++ addrindex.c 19 Sep 2012 15:13:59 -0000 1.28.2.51
@@ -1580,7 +1580,7 @@
addrIndex->loadedFlag = FALSE;
for (;;) {
rc = xml_parse_next_tag( file );
- if( file->level == 0 ) return;
+ if( rc < 0 || file->level == 0 ) return;
xtag = xml_get_current_tag( file );
@@ -2015,21 +2015,13 @@
*/
static void addrindex_consume_tree( XMLFile *file ) {
guint prev_level;
- gchar *element;
- GList *attr;
- XMLTag *xtag;
for (;;) {
prev_level = file->level;
xml_parse_next_tag( file );
- if (file->level < prev_level) return;
+ if (file->level < prev_level)
+ return;
- xtag = xml_get_current_tag( file );
- /* g_print( "tag : %s\n", xtag->tag ); */
- element = xml_get_element( file );
- attr = xml_get_current_tag_attr( file );
- /* show_attribs( attr ); */
- /* g_print( "\ttag value : %s :\n", element ); */
addrindex_consume_tree( file );
}
}
@@ -2197,8 +2189,6 @@
*/
static void addrindex_convert_tree( AddressIndex *addrIndex, XMLFile *file ) {
guint prev_level;
- gchar *element;
- GList *attr;
XMLTag *xtag;
/* Process file */
@@ -2225,10 +2215,6 @@
}
return;
}
- element = xml_get_element( file );
- attr = xml_get_current_tag_attr( file );
- /* show_attribs( attr ); */
- /* g_print( "\ttag value : %s :\n", element ); */
addrindex_consume_tree( file );
}
}
@@ -2791,7 +2777,6 @@
*/
void addrindex_remove_results( AddressDataSource *ds, ItemFolder *folder ) {
AddrBookBase *adbase;
- AddressCache *cache;
gint queryID = 0;
/* g_print( "addrindex_remove_results/start\n" ); */
@@ -2801,7 +2786,6 @@
/* g_print( "folder name ::%s::\n", ADDRITEM_NAME(folder) ); */
adbase = ( AddrBookBase * ) ds->rawDataSource;
if( adbase == NULL ) return;
- cache = adbase->addressCache;
/* Hide folder to prevent re-display */
addritem_folder_set_hidden( folder, TRUE );
Index: procmime.c
===================================================================
RCS file: /home/claws-mail/claws/src/procmime.c,v
retrieving revision 1.49.2.150
retrieving revision 1.49.2.151
diff -u -d -r1.49.2.150 -r1.49.2.151
--- procmime.c 12 Sep 2012 09:23:12 -0000 1.49.2.150
+++ procmime.c 19 Sep 2012 15:13:59 -0000 1.49.2.151
@@ -1701,15 +1701,15 @@
tmp[0] = '\0';
if ((tmp[1] == '0') && (tmp[2] == '\0') &&
- (g_slist_find_custom(concatlist, down_attr, g_strcmp0) == NULL))
+ (g_slist_find_custom(concatlist, down_attr, (GCompareFunc)g_strcmp0) == NULL))
concatlist = g_slist_prepend(concatlist, g_strdup(tmpattr));
- if (convert && (g_slist_find_custom(convlist, tmpattr, g_strcmp0) == NULL))
+ if (convert && (g_slist_find_custom(convlist, tmpattr, (GCompareFunc)g_strcmp0) == NULL))
convlist = g_slist_prepend(convlist, g_strdup(tmpattr));
g_free(tmpattr);
} else if (convert) {
- if (g_slist_find_custom(convlist, down_attr, g_strcmp0) == NULL)
+ if (g_slist_find_custom(convlist, down_attr, (GCompareFunc)g_strcmp0) == NULL)
convlist = g_slist_prepend(convlist, g_strdup(down_attr));
}
Index: jpilot.c
===================================================================
RCS file: /home/claws-mail/claws/src/jpilot.c,v
retrieving revision 1.18.2.36
retrieving revision 1.18.2.37
diff -u -d -r1.18.2.36 -r1.18.2.37
--- jpilot.c 7 Jul 2012 07:09:27 -0000 1.18.2.36
+++ jpilot.c 19 Sep 2012 15:13:59 -0000 1.18.2.37
@@ -560,6 +560,9 @@
}
r = fread(&rh, sizeof(record_header), 1, in);
+ if (r < 1)
+ return MGU_ERROR_READ;
+
offset = ((rh.Offset[0]*256+rh.Offset[1])*256+rh.Offset[2])*256+rh.Offset[3];
*size=offset - dbh.app_info_offset;
@@ -676,6 +679,8 @@
unsigned char packed_header[256];
int num;
+ memset(header, 0, sizeof(PC3RecordHeader));
+
num = fread(&l, sizeof(l), 1, pc_in);
if (feof(pc_in)) {
return -1;
@@ -718,12 +723,12 @@
}
num = read_header( in, &header );
if( num < 1 ) {
- if( ferror( in ) ) {
+ if( ferror( in ) )
return MGU_ERROR_READ;
- }
- if( feof( in ) ) {
+ else if( feof( in ) )
return MGU_EOF;
- }
+ else
+ return -1;
}
rec_len = header.rec_len;
record = malloc( rec_len );
@@ -1089,7 +1094,6 @@
gchar *labelEntry;
GList *node;
gchar* extID;
- struct AddressAppInfo *ai;
gchar **firstName = NULL;
gchar **lastName = NULL;
#if (PILOT_LINK_MAJOR > 11)
@@ -1167,19 +1171,9 @@
g_free( extID );
extID = NULL;
- /* Pointer to address metadata. */
- ai = & pilotFile->addrInfo;
-
/* Add entry for each email address listed under phone labels. */
indPhoneLbl = addr.phoneLabel;
for( k = 0; k < JPILOT_NUM_ADDR_PHONE; k++ ) {
- gint ind;
-
- ind = indPhoneLbl[k];
- /*
- * g_print( "%d : %d : %20s : %s\n", k, ind,
- * ai->phoneLabels[ind], addrEnt[3+k] );
- */
if( indPhoneLbl[k] == IND_PHONE_EMAIL ) {
labelEntry = addrEnt[ OFFSET_PHONE_LABEL + k ];
jpilot_parse_label( pilotFile, labelEntry, person );
More information about the Commits
mailing list