From 952e086a4c7dd9e795c9795e21ff5ea2c306c511 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sat, 20 Jun 2009 17:59:14 +0200 Subject: [PATCH 01/70] Add a hint that this isn't a vanilla build --- src/gtk/about.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/gtk/about.c b/src/gtk/about.c index 2b3ee21..b9b93f1 100644 --- a/src/gtk/about.c +++ b/src/gtk/about.c @@ -702,7 +702,7 @@ static void about_create(void) gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_CENTER); gtk_box_pack_start(GTK_BOX(vbox2), label, FALSE, FALSE, 0); markup = g_markup_printf_escaped - ("Claws Mail\nversion %s", + ("Claws Mail\nversion %s with local patches", VERSION); gtk_label_set_markup(GTK_LABEL(label), markup); g_free(markup); -- 1.6.3.2 From 419a842fc6cf13e62dd4743d050500da4c498927 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sat, 6 Jun 2009 19:47:45 +0200 Subject: [PATCH 02/70] Remove unecessary increment. --- src/common/utils.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/common/utils.c b/src/common/utils.c index 5769a32..2f6750d 100644 --- a/src/common/utils.c +++ b/src/common/utils.c @@ -3979,7 +3979,7 @@ void get_hex_str(gchar *out, guchar ch) INT_TO_HEX(hex, ch >> 4); *out++ = hex; INT_TO_HEX(hex, ch & 0x0f); - *out++ = hex; + *out = hex; } #undef REF_DEBUG -- 1.6.3.2 From d772c9987f5569d3da981bfec8f7520d9cb254aa Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sat, 6 Jun 2009 19:48:58 +0200 Subject: [PATCH 03/70] Remove pointless increment. --- src/common/utils.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/common/utils.c b/src/common/utils.c index 2f6750d..cada8d6 100644 --- a/src/common/utils.c +++ b/src/common/utils.c @@ -5206,7 +5206,7 @@ size_t fast_strftime(gchar *buf, gint buflen, const gchar *format, struct tm *lt *curpos++ = *format++; } } - *curpos++ = '\0'; + *curpos = '\0'; return total_done; } -- 1.6.3.2 From 9409ae509986042f73fde029198f5c71a3f68ff7 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sat, 6 Jun 2009 19:51:47 +0200 Subject: [PATCH 04/70] Incrementing rowcount has no effect here. --- src/compose.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/src/compose.c b/src/compose.c index 4715174..b8d5533 100644 --- a/src/compose.c +++ b/src/compose.c @@ -6572,8 +6572,6 @@ static GtkWidget *compose_create_others(Compose *compose) G_CALLBACK(compose_savemsg_select_cb), compose); - rowcount++; - return table; } -- 1.6.3.2 From 71a5b9ec2aed23e2a7b32fb3b5915efb4357031b Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sat, 6 Jun 2009 20:06:24 +0200 Subject: [PATCH 05/70] Report if writing to the queue message failed after a problem with the key selection has been detected. --- src/compose.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/src/compose.c b/src/compose.c index b8d5533..a784a03 100644 --- a/src/compose.c +++ b/src/compose.c @@ -5622,6 +5622,8 @@ static gint compose_queue_sub(Compose *compose, gint *msgnum, FolderItem **item, err |= (fprintf(fp, "X-Claws-Encrypt:%d\n", compose->use_encryption) < 0); /* and if encdata was null, it means there's been a problem in * key selection */ + if (err == TRUE) + g_warning("failed to write queue message\n"); lock = FALSE; fclose(fp); claws_unlink(tmp); -- 1.6.3.2 From 7862f88d2f5bd152f1027c13d2b0f2f757bf93a5 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sat, 6 Jun 2009 20:57:47 +0200 Subject: [PATCH 06/70] Remove code that seems to be dead since r1.35. --- src/mh.c | 6 ------ 1 files changed, 0 insertions(+), 6 deletions(-) diff --git a/src/mh.c b/src/mh.c index 3cfa7a0..3c6593a 100644 --- a/src/mh.c +++ b/src/mh.c @@ -463,7 +463,6 @@ static gint mh_copy_msgs(Folder *folder, FolderItem *dest, MsgInfoList *msglist, FolderItem *src = NULL; gchar *srcfile; gchar *destfile; - gint filemode = 0; FolderItemPrefs *prefs; MsgInfo *msginfo = NULL; MsgInfoList *cur = NULL; @@ -572,11 +571,6 @@ static gint mh_copy_msgs(Folder *folder, FolderItem *dest, MsgInfoList *msglist, if (prefs && prefs->enable_folder_chmod && prefs->folder_chmod) { if (chmod(destfile, prefs->folder_chmod) < 0) FILE_OP_ERROR(destfile, "chmod"); - - /* for mark file */ - filemode = prefs->folder_chmod; - if (filemode & S_IRGRP) filemode |= S_IWGRP; - if (filemode & S_IROTH) filemode |= S_IWOTH; } if (relation) g_relation_insert(relation, msginfo, GINT_TO_POINTER(dest->last_num+1)); -- 1.6.3.2 From c833cb26c9e349fe1fb1aef76c844fd94db53dda Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sat, 6 Jun 2009 23:39:40 +0200 Subject: [PATCH 07/70] Initializing p once is enough. --- src/common/utils.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/common/utils.c b/src/common/utils.c index cada8d6..76c7ae6 100644 --- a/src/common/utils.c +++ b/src/common/utils.c @@ -2856,7 +2856,7 @@ gint canonicalize_file_replace(const gchar *file) gchar *normalize_newlines(const gchar *str) { - const gchar *p = str; + const gchar *p; gchar *out, *outp; out = outp = g_malloc(strlen(str) + 1); -- 1.6.3.2 From a96a256adb4b8d3c7a55ef0216e9186e338037b8 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sat, 6 Jun 2009 23:46:22 +0200 Subject: [PATCH 08/70] prev_autowrap is already initialized through the macros. --- src/compose.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/compose.c b/src/compose.c index a784a03..45b5913 100644 --- a/src/compose.c +++ b/src/compose.c @@ -2219,7 +2219,7 @@ Compose *compose_reedit(MsgInfo *msginfo, gboolean batch) } if (fp != NULL) { - gboolean prev_autowrap = compose->autowrap; + gboolean prev_autowrap; GtkTextBuffer *buffer = textbuf; BLOCK_WRAP(); while (fgets(buf, sizeof(buf), fp) != NULL) { -- 1.6.3.2 From 45fbf4329434d0adae629b9677eb0baf86ed48de Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sat, 6 Jun 2009 23:48:26 +0200 Subject: [PATCH 09/70] buffer will be initialized by BLOC_WRAP(). --- src/compose.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/compose.c b/src/compose.c index 45b5913..ee04d6e 100644 --- a/src/compose.c +++ b/src/compose.c @@ -2220,7 +2220,7 @@ Compose *compose_reedit(MsgInfo *msginfo, gboolean batch) if (fp != NULL) { gboolean prev_autowrap; - GtkTextBuffer *buffer = textbuf; + GtkTextBuffer *buffer; BLOCK_WRAP(); while (fgets(buf, sizeof(buf), fp) != NULL) { strcrchomp(buf); -- 1.6.3.2 From efc8e06900056c95e0fba2e974e3f9f21f5490f2 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sat, 6 Jun 2009 23:49:27 +0200 Subject: [PATCH 10/70] Initializing p once is enough. --- src/procheader.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/procheader.c b/src/procheader.c index 5b9b545..a727289 100644 --- a/src/procheader.c +++ b/src/procheader.c @@ -274,7 +274,7 @@ gboolean procheader_headername_equal(char * hdr1, char * hdr2) Header * procheader_parse_header(gchar * buf) { - gchar *p = buf; + gchar *p; Header * header; if ((*buf == ':') || (*buf == ' ')) -- 1.6.3.2 From 333afcd3aaa5c3f52e94a0da1200fc38eb2b2242 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sat, 6 Jun 2009 23:50:11 +0200 Subject: [PATCH 11/70] Fix white space. --- src/procheader.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/procheader.c b/src/procheader.c index a727289..5479bb4 100644 --- a/src/procheader.c +++ b/src/procheader.c @@ -275,7 +275,7 @@ gboolean procheader_headername_equal(char * hdr1, char * hdr2) Header * procheader_parse_header(gchar * buf) { gchar *p; - Header * header; + Header *header; if ((*buf == ':') || (*buf == ' ')) return NULL; -- 1.6.3.2 From 7ac04084dbbde5b1eb236ccd77857de962b93822 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sat, 6 Jun 2009 23:51:18 +0200 Subject: [PATCH 12/70] Initializing cur once is enough. --- src/procmsg.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/procmsg.c b/src/procmsg.c index 395879b..ceda77d 100644 --- a/src/procmsg.c +++ b/src/procmsg.c @@ -821,7 +821,7 @@ static gboolean procmsg_is_last_for_account(FolderItem *queue, MsgInfo *msginfo, { gchar *file = folder_item_fetch_msg(queue, msginfo->msgnum); PrefsAccount *ac = procmsg_get_account_from_file(file); - GSList *cur = elem; + GSList *cur; g_free(file); for (cur = elem; cur; cur = cur->next) { MsgInfo *cur_msginfo = (MsgInfo *)cur->data; -- 1.6.3.2 From bd49e7d181d4595cd92fd3b56b9d5a87b5fcd180 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sat, 6 Jun 2009 23:57:48 +0200 Subject: [PATCH 13/70] Set start_node to item->node directly. There's no need to involve node. --- src/folder.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/folder.c b/src/folder.c index 7a434b6..21859b8 100644 --- a/src/folder.c +++ b/src/folder.c @@ -404,7 +404,7 @@ void folder_item_remove(FolderItem *item) cm_return_if_fail(item->folder != NULL); cm_return_if_fail(item->folder->node != NULL); - start_node = node = item->node; + start_node = item->node; node = item->folder->node; -- 1.6.3.2 From b8e1e1ee33763354c128afb19161825204d1060e Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sun, 7 Jun 2009 00:10:33 +0200 Subject: [PATCH 14/70] Remove interim variable tags. Maybe tmp should be renamed to tags. --- src/prefs_filtering_action.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/prefs_filtering_action.c b/src/prefs_filtering_action.c index a4b8713..92c40f7 100644 --- a/src/prefs_filtering_action.c +++ b/src/prefs_filtering_action.c @@ -360,7 +360,7 @@ static void prefs_filtering_action_create(void) static GdkGeometry geometry; GList * accounts; - GSList *tmp, *tags; + GSList *tmp; GtkSizeGroup *size_group = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); GtkSizeGroup *size_action = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); @@ -513,7 +513,7 @@ static void prefs_filtering_action_create(void) tags_combo = gtk_combo_box_new_text (); gtk_size_group_add_widget(size_action, tags_combo); - for (tmp = tags = tags_get_list() ; tmp != NULL; + for (tmp = tags_get_list() ; tmp != NULL; tmp = tmp->next) { gchar *name = g_strdup(tags_get_tag(GPOINTER_TO_INT(tmp->data))); -- 1.6.3.2 From e9c2ab8195c06089c565f29915f95c314218aa66 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sun, 7 Jun 2009 00:15:30 +0200 Subject: [PATCH 15/70] Fix dead stores. The inner loops already take care of setting n to 0. --- src/textview.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/textview.c b/src/textview.c index 5226e20..c26813b 100644 --- a/src/textview.c +++ b/src/textview.c @@ -1248,7 +1248,7 @@ static void textview_make_clickable_parts(TextView *textview, gtk_text_buffer_get_end_iter(buffer, &iter); /* parse for clickable parts, and build a list of begin and end positions */ - for (walk = mybuf, n = 0;;) { + for (walk = mybuf;;) { gint last_index = PARSE_ELEMS; gchar *scanpos = NULL; @@ -1368,7 +1368,7 @@ static void textview_make_clickable_parts_later(TextView *textview, offset = gtk_text_iter_get_offset(&start_iter); /* parse for clickable parts, and build a list of begin and end positions */ - for (walk = mybuf, n = 0;;) { + for (walk = mybuf;;) { gint last_index = PARSE_ELEMS; gchar *scanpos = NULL; -- 1.6.3.2 From 44c08f780dec1999947980b20bf567b74bd138dc Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sun, 7 Jun 2009 01:22:40 +0200 Subject: [PATCH 16/70] Don't ignore gnutls_certificate_verify_peers2()'s return code. --- src/common/ssl.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/src/common/ssl.c b/src/common/ssl.c index a16c58a..f05b2c9 100644 --- a/src/common/ssl.c +++ b/src/common/ssl.c @@ -317,7 +317,8 @@ gboolean ssl_init_socket_with_method(SockInfo *sockinfo, SSLMethod method) r = gnutls_certificate_verify_peers2(session, &status); - if (!ssl_certificate_check(cert, status, sockinfo->canonical_name, sockinfo->hostname, sockinfo->port)) { + if (r < 0 + || !ssl_certificate_check(cert, status, sockinfo->canonical_name, sockinfo->hostname, sockinfo->port)) { gnutls_x509_crt_deinit(cert); gnutls_certificate_free_credentials(xcred); gnutls_deinit(session); -- 1.6.3.2 From 11175a1361982344d76d1ce5986727a92acb4e04 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sat, 20 Jun 2009 12:49:52 +0200 Subject: [PATCH 17/70] str will never be read from srcp. --- src/common/utils.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/common/utils.c b/src/common/utils.c index 76c7ae6..0712b47 100644 --- a/src/common/utils.c +++ b/src/common/utils.c @@ -704,7 +704,7 @@ void eliminate_parenthesis(gchar *str, gchar op, gchar cl) register gchar *srcp, *destp; gint in_brace; - srcp = destp = str; + destp = str; while ((destp = strchr(destp, op))) { in_brace = 1; @@ -728,7 +728,7 @@ void extract_parenthesis(gchar *str, gchar op, gchar cl) register gchar *srcp, *destp; gint in_brace; - srcp = destp = str; + destp = str; while ((srcp = strchr(destp, op))) { if (destp > str) @@ -757,7 +757,7 @@ static void extract_parenthesis_with_skip_quote(gchar *str, gchar quote_chr, gint in_brace; gboolean in_quote = FALSE; - srcp = destp = str; + destp = str; while ((srcp = strchr_with_skip_quote(destp, quote_chr, op))) { if (destp > str) @@ -803,7 +803,7 @@ void eliminate_address_comment(gchar *str) register gchar *srcp, *destp; gint in_brace; - srcp = destp = str; + destp = str; while ((destp = strchr(destp, '"'))) { if ((srcp = strchr(destp + 1, '"'))) { @@ -820,7 +820,7 @@ void eliminate_address_comment(gchar *str) } } - srcp = destp = str; + destp = str; while ((destp = strchr_with_skip_quote(destp, '"', '('))) { in_brace = 1; -- 1.6.3.2 From 559b83cf6cdddf565057202a69e2abfdd61ded7a Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sat, 20 Jun 2009 12:52:51 +0200 Subject: [PATCH 18/70] Remove write-only variable gtktext. --- src/gtk/gtkaspell.c | 12 ------------ 1 files changed, 0 insertions(+), 12 deletions(-) diff --git a/src/gtk/gtkaspell.c b/src/gtk/gtkaspell.c index f038705..3e3ee5e 100644 --- a/src/gtk/gtkaspell.c +++ b/src/gtk/gtkaspell.c @@ -911,12 +911,9 @@ static gboolean check_at(GtkAspell *gtkaspell, gint from_pos) { gint start, end; char buf[GTKASPELLWORDSIZE]; - GtkTextView *gtktext; cm_return_val_if_fail(from_pos >= 0, FALSE); - gtktext = gtkaspell->gtktext; - if (!get_word_from_pos(gtkaspell, from_pos, buf, sizeof(buf), &start, &end)) return FALSE; @@ -1264,10 +1261,7 @@ static void replace_real_word_cb(gpointer data, const gchar *newword) /* Accept this word for this session */ static void add_word_to_session_cb(GtkWidget *w, gpointer data) { - GtkTextView *gtktext; GtkAspell *gtkaspell = (GtkAspell *) data; - gtktext = gtkaspell->gtktext; - enchant_dict_add_to_session(gtkaspell->gtkaspeller->speller, gtkaspell->theword, strlen(gtkaspell->theword)); @@ -1731,12 +1725,10 @@ static GSList *make_sug_menu(GtkAspell *gtkaspell) { GtkWidget *item; char *caption; - GtkTextView *gtktext; GtkAccelGroup *accel; GList *l = gtkaspell->suggestions_list; gchar *utf8buf; GSList *list = NULL; - gtktext = gtkaspell->gtktext; if (l == NULL) return NULL; @@ -2189,10 +2181,6 @@ static void switch_to_alternate_cb(GtkWidget *w, static void set_point_continue(GtkAspell *gtkaspell) { - GtkTextView *gtktext; - - gtktext = gtkaspell->gtktext; - gtkaspell->ctx.set_position(gtkaspell->ctx.data, gtkaspell->orig_pos); if (gtkaspell->continue_check) -- 1.6.3.2 From 57fcc08762c348a349646c14ef87551dbbc71ad8 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sun, 7 Jun 2009 16:20:04 +0200 Subject: [PATCH 19/70] Don't intialize tmp twice. --- src/gtk/gtkaspell.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/src/gtk/gtkaspell.c b/src/gtk/gtkaspell.c index 3e3ee5e..3a59c77 100644 --- a/src/gtk/gtkaspell.c +++ b/src/gtk/gtkaspell.c @@ -1952,7 +1952,6 @@ static GSList *populate_submenu(GtkAspell *gtkaspell) int count = 0; Dictionary *dict; GSList *tmp; - tmp = gtkaspellcheckers->dictionary_list; for (tmp = gtkaspellcheckers->dictionary_list; tmp != NULL; tmp = g_slist_next(tmp)) { -- 1.6.3.2 From 037368549cef29cfb0079f60e7a951108d15003d Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sun, 7 Jun 2009 16:24:40 +0200 Subject: [PATCH 20/70] This hbox doesn't seem to be used. --- src/gtk/gtkaspell.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/src/gtk/gtkaspell.c b/src/gtk/gtkaspell.c index 3a59c77..f052805 100644 --- a/src/gtk/gtkaspell.c +++ b/src/gtk/gtkaspell.c @@ -1441,8 +1441,6 @@ static void replace_with_create_dialog_cb(GtkWidget *w, gpointer data) gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0); gtk_widget_show(label); - hbox = gtk_hbox_new(TRUE, 0); - gtkut_stock_button_set_create(&confirm_area, &cancel_button, GTK_STOCK_CANCEL, &ok_button, GTK_STOCK_OK, -- 1.6.3.2 From 40333d0a62be4f21d0fd29236d98524e5a2519e5 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sun, 7 Jun 2009 16:30:07 +0200 Subject: [PATCH 21/70] Not sure about this one, but otherwise w_hbox would have no purpose. --- src/gtk/gtkaspell.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gtk/gtkaspell.c b/src/gtk/gtkaspell.c index f052805..a2aef1b 100644 --- a/src/gtk/gtkaspell.c +++ b/src/gtk/gtkaspell.c @@ -1397,10 +1397,10 @@ static void replace_with_create_dialog_cb(GtkWidget *w, gpointer data) icon = gtk_image_new_from_stock(GTK_STOCK_DIALOG_QUESTION, GTK_ICON_SIZE_DIALOG); gtk_misc_set_alignment (GTK_MISC (icon), 0.5, 0.0); - gtk_box_pack_start (GTK_BOX (hbox), icon, FALSE, FALSE, 0); + gtk_box_pack_start (GTK_BOX (w_hbox), icon, FALSE, FALSE, 0); vbox = gtk_vbox_new (FALSE, 12); - gtk_box_pack_start (GTK_BOX (hbox), vbox, TRUE, TRUE, 0); + gtk_box_pack_start (GTK_BOX (w_hbox), vbox, TRUE, TRUE, 0); gtk_widget_show (vbox); label = gtk_label_new(thelabel); -- 1.6.3.2 From f263b6384df4c0d030937bc2ebe23d47439ff816 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sun, 7 Jun 2009 16:34:25 +0200 Subject: [PATCH 22/70] Remove write-only variable wordlen. --- src/gtk/gtkaspell.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/src/gtk/gtkaspell.c b/src/gtk/gtkaspell.c index a2aef1b..bec2234 100644 --- a/src/gtk/gtkaspell.c +++ b/src/gtk/gtkaspell.c @@ -1181,7 +1181,7 @@ static void replace_word_cb(GtkWidget *w, gpointer data) static void replace_real_word(GtkAspell *gtkaspell, const gchar *newword) { - int oldlen, newlen, wordlen; + int oldlen, newlen; gint origpos; gint pos; GtkTextView *gtktext; @@ -1196,7 +1196,6 @@ static void replace_real_word(GtkAspell *gtkaspell, const gchar *newword) origpos = gtkaspell->orig_pos; pos = origpos; oldlen = gtkaspell->end_pos - gtkaspell->start_pos; - wordlen = strlen(gtkaspell->theword); newlen = strlen(newword); /* FIXME: multybyte characters? */ -- 1.6.3.2 From 4149710c9d268a5ea8135a329bc4e734d2514f11 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sun, 7 Jun 2009 16:42:19 +0200 Subject: [PATCH 23/70] Remove write-only variable end. Mark parameter as unused. --- src/gtk/gtkaspell.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/gtk/gtkaspell.c b/src/gtk/gtkaspell.c index bec2234..1f18ea5 100644 --- a/src/gtk/gtkaspell.c +++ b/src/gtk/gtkaspell.c @@ -513,15 +513,17 @@ static void entry_delete_cb(GtkTextBuffer *textbuf, GtkAspell *gtkaspell) { int origpos; - gint start, end; - + gint start; + + /* XXX: unused parameter. */ + (void)enditer; + cm_return_if_fail(gtkaspell->gtkaspeller->speller); if (!gtkaspell->check_while_typing) return; start = gtk_text_iter_get_offset(startiter); - end = gtk_text_iter_get_offset(enditer); origpos = get_textview_buffer_offset(gtkaspell->gtktext); if (start) { check_at(gtkaspell, start - 1); -- 1.6.3.2 From 57a9637c1866510f03181de1e8b4fb9ff09754cc Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sat, 20 Jun 2009 13:55:09 +0200 Subject: [PATCH 24/70] Remove write-only variable is_group. --- src/addr_compl.c | 9 ++------- 1 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/addr_compl.c b/src/addr_compl.c index d16eb34..642afdc 100644 --- a/src/addr_compl.c +++ b/src/addr_compl.c @@ -256,14 +256,9 @@ static gint add_address(const gchar *name, const gchar *address, const gchar *nick, const gchar *alias, GList *grp_emails) { address_entry *ae; - gboolean is_group = FALSE; - if (!name || !address) { - if (!address && !nick && !alias && grp_emails) { - is_group = TRUE; - } else - return -1; - } + if ((!name || !address) && (nick || alias || !grp_emails)) + return -1; ae = g_new0(address_entry, 1); -- 1.6.3.2 From 44a67c95350b88487b2e41d0b98241494c3d1228 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sat, 20 Jun 2009 14:26:34 +0200 Subject: [PATCH 25/70] Fix dead store. --- src/addrharvest.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/src/addrharvest.c b/src/addrharvest.c index 8cb51ef..df1c0c3 100644 --- a/src/addrharvest.c +++ b/src/addrharvest.c @@ -528,7 +528,6 @@ static void addrharvest_parse_address( name = g_strdup(""); } else { - name = buffer; name = conv_unmime_header(buffer, NULL); } -- 1.6.3.2 From de44f1ab8232747e91d16a0776772dd0dfc38f88 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sat, 20 Jun 2009 14:32:40 +0200 Subject: [PATCH 26/70] Remove write-only variable prev_level. --- src/addrindex.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/src/addrindex.c b/src/addrindex.c index a6e0de5..8a9b91d 100644 --- a/src/addrindex.c +++ b/src/addrindex.c @@ -1569,7 +1569,6 @@ static int addrindex_write_ldap( FILE *fp, AddressDataSource *ds, gint lvl ) { * \param file Address index file. */ static void addrindex_read_index( AddressIndex *addrIndex, XMLFile *file ) { - guint prev_level; XMLTag *xtag; AddressInterface *iface = NULL, *dsIFace = NULL; AddressDataSource *ds; @@ -1577,7 +1576,6 @@ static void addrindex_read_index( AddressIndex *addrIndex, XMLFile *file ) { addrIndex->loadedFlag = FALSE; for (;;) { - prev_level = file->level; rc = xml_parse_next_tag( file ); if( file->level == 0 ) return; -- 1.6.3.2 From eb55bf1fa687225a19c00f6a07df8163dc7b9264 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sat, 20 Jun 2009 15:22:33 +0200 Subject: [PATCH 27/70] bp and ep are pointers so use NULL instead of 0. --- src/compose.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/compose.c b/src/compose.c index ee04d6e..0bdf2b6 100644 --- a/src/compose.c +++ b/src/compose.c @@ -4245,7 +4245,7 @@ colorize: } } - bp = ep = 0; + bp = ep = NULL; if (scanpos) { /* check if URI can be parsed */ if (parser[last_index].parse(walk, scanpos, (const gchar **)&bp, -- 1.6.3.2 From 2963cec7b20de9ab263707a2a8bee5cc39c8d530 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sat, 20 Jun 2009 15:26:21 +0200 Subject: [PATCH 28/70] Mark a potential problem. --- src/compose.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/src/compose.c b/src/compose.c index 0bdf2b6..21adcfc 100644 --- a/src/compose.c +++ b/src/compose.c @@ -4255,6 +4255,7 @@ colorize: } else walk = scanpos + strlen(parser[last_index].needle); + /* XXX: The values written to walk will no be read. Should they be written to o_walk? */ } if (bp && ep) { uri_start = walk_pos + (bp - o_walk); -- 1.6.3.2 From 3a41e66434b9aff7179f186407ff48ef136107cf Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sat, 20 Jun 2009 15:32:12 +0200 Subject: [PATCH 29/70] Fix dead store. --- src/compose.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/src/compose.c b/src/compose.c index 21adcfc..cd10af8 100644 --- a/src/compose.c +++ b/src/compose.c @@ -2427,7 +2427,6 @@ void compose_entry_append(Compose *compose, const gchar *address, gchar *o_tmp = tmp; tmp[cur-begin]='\0'; cur++; - begin = cur; while (*tmp == ' ' || *tmp == '\t') tmp++; compose_add_header_entry(compose, header, tmp); -- 1.6.3.2 From dadf45a02e1767750af3576cca801493fcfe52dd Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sat, 20 Jun 2009 15:35:35 +0200 Subject: [PATCH 30/70] Remove redundant code. body_fmt will be overwritten anyway, and the same code exists in the else block below. --- src/compose.c | 5 ----- 1 files changed, 0 insertions(+), 5 deletions(-) diff --git a/src/compose.c b/src/compose.c index cd10af8..d4b5357 100644 --- a/src/compose.c +++ b/src/compose.c @@ -1699,11 +1699,6 @@ Compose *compose_forward(PrefsAccount *account, MsgInfo *msginfo, const gchar *body_fmt = NULL; MsgInfo *full_msginfo; - if (prefs_common.fw_quotefmt && *prefs_common.fw_quotefmt) - body_fmt = gettext(prefs_common.fw_quotefmt); - else - body_fmt = ""; - full_msginfo = procmsg_msginfo_get_full_info(msginfo); if (!full_msginfo) full_msginfo = procmsg_msginfo_copy(msginfo); -- 1.6.3.2 From 6cfab834251bf5031a8a3f963ef92d4e08e94e6f Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sat, 20 Jun 2009 15:43:37 +0200 Subject: [PATCH 31/70] Remove write-only variable style. --- src/compose.c | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-) diff --git a/src/compose.c b/src/compose.c index d4b5357..15438cc 100644 --- a/src/compose.c +++ b/src/compose.c @@ -852,10 +852,7 @@ static void compose_create_tags(GtkTextView *text, Compose *compose) for (i = 0; i < 8; i++) { if (success[i] == FALSE) { - GtkStyle *style; - g_warning("Compose: color allocation failed.\n"); - style = gtk_widget_get_style(GTK_WIDGET(text)); quote_color1 = quote_color2 = quote_color3 = quote_bgcolor1 = quote_bgcolor2 = quote_bgcolor3 = signature_color = uri_color = black; -- 1.6.3.2 From 6e84d66d2f09be9b5779eb5ea97f5c9d7bc6f500 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sat, 20 Jun 2009 15:49:38 +0200 Subject: [PATCH 32/70] Remove write-only variable folder. --- src/folder.c | 4 ---- 1 files changed, 0 insertions(+), 4 deletions(-) diff --git a/src/folder.c b/src/folder.c index 21859b8..a6215c9 100644 --- a/src/folder.c +++ b/src/folder.c @@ -2626,13 +2626,11 @@ void folder_item_write_cache(FolderItem *item) MsgInfo *folder_item_get_msginfo(FolderItem *item, gint num) { - Folder *folder; MsgInfo *msginfo = NULL; cm_return_val_if_fail(item != NULL, NULL); if (item->no_select) return NULL; - folder = item->folder; if (!item->cache) folder_item_read_cache(item); @@ -2650,7 +2648,6 @@ MsgInfo *folder_item_get_msginfo(FolderItem *item, gint num) MsgInfo *folder_item_get_msginfo_by_msgid(FolderItem *item, const gchar *msgid) { - Folder *folder; MsgInfo *msginfo; cm_return_val_if_fail(item != NULL, NULL); @@ -2658,7 +2655,6 @@ MsgInfo *folder_item_get_msginfo_by_msgid(FolderItem *item, const gchar *msgid) if (item->no_select) return FALSE; - folder = item->folder; if (!item->cache) folder_item_read_cache(item); -- 1.6.3.2 From 00d5e7a67f396d14fc4a9ce82fb31124a66f0568 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sat, 20 Jun 2009 15:53:19 +0200 Subject: [PATCH 33/70] Fix dead store. --- src/folder.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/src/folder.c b/src/folder.c index a6215c9..93442cc 100644 --- a/src/folder.c +++ b/src/folder.c @@ -3179,8 +3179,6 @@ gint folder_item_move_to(FolderItem *src, FolderItem *dest, FolderItem **new_ite tmp = folder_item_parent(tmp); } - tmp = folder_item_parent(src); - src_identifier = folder_item_get_identifier(src); dst_identifier = folder_item_get_identifier(dest); -- 1.6.3.2 From 9b1790892c757234a7471dbdd452e7fdb4355b86 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sat, 20 Jun 2009 15:56:23 +0200 Subject: [PATCH 34/70] Remove write-only variable finished --- src/imap.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/src/imap.c b/src/imap.c index 68cbf76..891bdac 100644 --- a/src/imap.c +++ b/src/imap.c @@ -3069,9 +3069,7 @@ static GSList *imap_get_uncached_messages(IMAPSession *session, GSList *result = NULL; GSList * cur; uncached_data *data = g_new0(uncached_data, 1); - int finished; - finished = 0; cur = numlist; data->total = g_slist_length(numlist); data->ok = MAILIMAP_NO_ERROR; -- 1.6.3.2 From 931355dea197b04eb8a98e8b0c06c92dd2c23b97 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sat, 20 Jun 2009 15:57:59 +0200 Subject: [PATCH 35/70] Remove write-only variable single. --- src/imap.c | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-) diff --git a/src/imap.c b/src/imap.c index 891bdac..b1ac9c8 100644 --- a/src/imap.c +++ b/src/imap.c @@ -1734,7 +1734,6 @@ static gint imap_do_copy_msgs(Folder *folder, FolderItem *dest, gint ok = MAILIMAP_NO_ERROR; GRelation *uid_mapping; gint last_num = 0; - gboolean single = FALSE; g_return_val_if_fail(folder != NULL, -1); g_return_val_if_fail(dest != NULL, -1); @@ -1748,8 +1747,6 @@ static gint imap_do_copy_msgs(Folder *folder, FolderItem *dest, } msginfo = (MsgInfo *)msglist->data; - if (msglist->next == NULL) - single = TRUE; src = msginfo->folder; if (src == dest) { g_warning("the src folder is identical to the dest.\n"); -- 1.6.3.2 From 34180593bd7a34d9cade74872432f321eb7ad38b Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sat, 20 Jun 2009 15:59:46 +0200 Subject: [PATCH 36/70] Remove write-only variable lastuid_old. --- src/imap.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/src/imap.c b/src/imap.c index b1ac9c8..3f5b90d 100644 --- a/src/imap.c +++ b/src/imap.c @@ -3937,7 +3937,7 @@ static gint get_list_of_uids(IMAPSession *session, Folder *folder, IMAPFolderIte GSList *uidlist, *elem; int r = -1; clist * lep_uidlist; - gint ok, nummsgs = 0, lastuid_old; + gint ok, nummsgs = 0; if (session == NULL) { return -1; @@ -3987,8 +3987,6 @@ static gint get_list_of_uids(IMAPSession *session, Folder *folder, IMAPFolderIte return -1; } - lastuid_old = item->lastuid; - for (elem = uidlist; elem != NULL; elem = g_slist_next(elem)) { guint msgnum; -- 1.6.3.2 From 1c9194709ed3bc522d26bd80a2e9a8201869865f Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sat, 20 Jun 2009 16:02:31 +0200 Subject: [PATCH 37/70] Remove write-only variable selected_folder. --- src/imap.c | 4 ---- 1 files changed, 0 insertions(+), 4 deletions(-) diff --git a/src/imap.c b/src/imap.c index 3f5b90d..33414b1 100644 --- a/src/imap.c +++ b/src/imap.c @@ -4011,7 +4011,6 @@ gint imap_get_num_list(Folder *folder, FolderItem *_item, GSList **msgnum_list, gint nummsgs; GSList *uidlist = NULL; gchar *dir; - gboolean selected_folder; gint known_list_len = 0; debug_print("get_num_list\n"); @@ -4055,9 +4054,6 @@ gint imap_get_num_list(Folder *folder, FolderItem *_item, GSList **msgnum_list, statusbar_print_all(_("Scanning folder %s ..."), FOLDER_ITEM(item)->folder->name); - selected_folder = (session->mbox != NULL) && - (!strcmp(session->mbox, item->item.path)); - if (item->should_trash_cache) { *old_uids_valid = FALSE; debug_print("get_num_list: trashing num list\n"); -- 1.6.3.2 From c4cadeb03e674dfc7121f2129ab885f8e28f62bb Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sat, 20 Jun 2009 16:19:08 +0200 Subject: [PATCH 38/70] Remove dead assignment. --- src/mainwindow.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/src/mainwindow.c b/src/mainwindow.c index 73ea4c1..fa4da36 100644 --- a/src/mainwindow.c +++ b/src/mainwindow.c @@ -3270,7 +3270,6 @@ void main_window_set_menu_sensitive(MainWindow *mainwin) messageview_is_visible(mainwin->messageview)); summaryview = mainwin->summaryview; - menu_path = "Menu/View/Sort/DontSort"; switch (summaryview->sort_key) { case SORT_BY_NUMBER: -- 1.6.3.2 From e9e360d441f04172a74c8babe7843400696cf92e Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sat, 20 Jun 2009 16:21:11 +0200 Subject: [PATCH 39/70] Remove dead assignment. --- src/imap.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/src/imap.c b/src/imap.c index 33414b1..69472f8 100644 --- a/src/imap.c +++ b/src/imap.c @@ -5677,7 +5677,6 @@ char* imap_modified_utf7_to_utf8(const char *mbox, gboolean change_spaces) const char *src; char *dst, *res = malloc(2*strlen(mbox)+1); - bitbuf = 0; dst = res; src = mbox; if(!dst) return NULL; -- 1.6.3.2 From 0a6f12bb606dd5962fcfa4932e8f4a5a745e6729 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sat, 20 Jun 2009 16:22:44 +0200 Subject: [PATCH 40/70] Remove dead assignment. --- src/ldif.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/src/ldif.c b/src/ldif.c index e16e6e6..dc4824c 100644 --- a/src/ldif.c +++ b/src/ldif.c @@ -719,7 +719,6 @@ static void ldif_read_file( LdifFile *ldifFile, AddressCache *cache ) { mgu_free_list( listValue ); lastTag = NULL; listValue = NULL; - last64 = FALSE; } lastTag = g_strdup( tagName ); -- 1.6.3.2 From dbc6ef48191b221cd28f5edf9b04f260bfbaf089 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sat, 20 Jun 2009 16:31:06 +0200 Subject: [PATCH 41/70] Remove dead assignment. --- src/imap.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/src/imap.c b/src/imap.c index 69472f8..97796f5 100644 --- a/src/imap.c +++ b/src/imap.c @@ -5810,7 +5810,6 @@ char* imap_utf8_to_modified_utf7(const char *src, gboolean change_spaces) /* Encode US-ASCII characters as themselves */ if (c < 0x80) { ucs4 = c; - utf8total = 1; } else if (utf8total) { /* save UTF8 bits into UCS4 */ ucs4 = (ucs4 << 6) | (c & 0x3FUL); -- 1.6.3.2 From f2b2da36e5b73c9562f43407fedaf2817e19f7dc Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sat, 20 Jun 2009 16:36:34 +0200 Subject: [PATCH 42/70] Remove dead assignment in main_window_toggle_message_view(). --- src/mainwindow.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/src/mainwindow.c b/src/mainwindow.c index fa4da36..ae8e8f4 100644 --- a/src/mainwindow.c +++ b/src/mainwindow.c @@ -2829,7 +2829,6 @@ void main_window_toggle_message_view(MainWindow *mainwin) } break; case WIDE_LAYOUT: - ppaned = mainwin->hpaned; container = mainwin->vpaned; if (mainwin->messageview->vbox->parent != NULL) { mainwin->messageview->visible = FALSE; -- 1.6.3.2 From 846af6ba7a2c13da990ddd70ce16ed6900c4b500 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sat, 20 Jun 2009 16:38:59 +0200 Subject: [PATCH 43/70] Remove dead assignment in mainwindow_tags_menu_item_activate_item_cb(). --- src/mainwindow.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/src/mainwindow.c b/src/mainwindow.c index ae8e8f4..af11b57 100644 --- a/src/mainwindow.c +++ b/src/mainwindow.c @@ -1003,7 +1003,6 @@ static void mainwindow_tags_menu_item_activate_item_cb(GtkMenuItem *menu_item, for (; tags; tags = tags->next) { gint num_checked = GPOINTER_TO_INT(g_hash_table_lookup(menu_allsel_table, tags->data)); - id = GPOINTER_TO_INT(tags->data); item = g_hash_table_lookup(menu_table, GINT_TO_POINTER(tags->data)); if (item && !item->active) { gtk_check_menu_item_set_active -- 1.6.3.2 From 6fa323e3033960404466a6891692cca29423f238 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sat, 20 Jun 2009 16:50:51 +0200 Subject: [PATCH 44/70] Remove dead assignments in proc_mbox(). --- src/mbox.c | 4 ---- 1 files changed, 0 insertions(+), 4 deletions(-) diff --git a/src/mbox.c b/src/mbox.c index df32656..7306742 100644 --- a/src/mbox.c +++ b/src/mbox.c @@ -153,15 +153,11 @@ gint proc_mbox(FolderItem *dest, const gchar *mbox, gboolean apply_filter, empty_lines = 0; lines = 0; - more = FALSE; /* process all lines from mboxrc file */ while (fgets(buf, sizeof(buf), mbox_fp) != NULL) { int offset; - /* eof not reached, expect more lines */ - more = TRUE; - /* eat empty lines */ if (buf[0] == '\n' || buf[0] == '\r') { empty_lines++; -- 1.6.3.2 From abd404e338888658e22093f1c96861fec37e7223 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sat, 20 Jun 2009 16:56:06 +0200 Subject: [PATCH 45/70] Remove write-only variable mainbox_size in icon_list_clear() --- src/mimeview.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/src/mimeview.c b/src/mimeview.c index 88e29d6..3249ab9 100644 --- a/src/mimeview.c +++ b/src/mimeview.c @@ -2400,14 +2400,12 @@ static void icon_list_clear (MimeView *mimeview) static void icon_scroll_size_allocate_cb(GtkWidget *widget, GtkAllocation *size, MimeView *mimeview) { - GtkAllocation *mainbox_size; GtkAllocation *vbox_size; GtkAllocation *layout_size; GtkAdjustment *adj; adj = gtk_layout_get_vadjustment(GTK_LAYOUT(mimeview->icon_scroll)); - mainbox_size = &mimeview->icon_mainbox->allocation; vbox_size = &mimeview->icon_vbox->allocation; layout_size = &mimeview->icon_scroll->allocation; -- 1.6.3.2 From 6a56739f3b7bd5dcf624b443951db877f5b58540 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sat, 20 Jun 2009 16:57:51 +0200 Subject: [PATCH 46/70] Remove write-only variable textview in icon_key_pressed() --- src/mimeview.c | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-) diff --git a/src/mimeview.c b/src/mimeview.c index 3249ab9..311ce18 100644 --- a/src/mimeview.c +++ b/src/mimeview.c @@ -2105,15 +2105,12 @@ static gint icon_key_pressed(GtkWidget *button, GdkEventKey *event, gint num; MimeInfo *partinfo; SummaryView *summaryview; - TextView *textview; num = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(button), "icon_number")); partinfo = g_object_get_data(G_OBJECT(button), "partinfo"); if (!event) return FALSE; - textview = mimeview->textview; - switch (event->keyval) { case GDK_space: if (mimeview_scroll_page(mimeview, FALSE)) -- 1.6.3.2 From 726a6704ce4cffd6d88d8bba1d300f28679cb84d Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sat, 20 Jun 2009 17:03:00 +0200 Subject: [PATCH 47/70] In the switch() block in update_signature_noticeview(), make it more obvious that that SIGNATURE_CHECK_FAILED and SIGNATURE_CHECK_TIMEOUT are treated the same. Also let them have their own break statement instead of falling through the default case. --- src/mimeview.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/src/mimeview.c b/src/mimeview.c index 311ce18..7260f0b 100644 --- a/src/mimeview.c +++ b/src/mimeview.c @@ -895,13 +895,11 @@ static void update_signature_noticeview(MimeView *mimeview, MimeInfo *mimeinfo, icon = STOCK_PIXMAP_PRIVACY_FAILED; break; case SIGNATURE_CHECK_FAILED: - button_text = _("Check again"); - func = check_signature_cb; - icon = STOCK_PIXMAP_PRIVACY_UNKNOWN; case SIGNATURE_CHECK_TIMEOUT: button_text = _("Check again"); func = check_signature_cb; icon = STOCK_PIXMAP_PRIVACY_UNKNOWN; + break; default: break; } -- 1.6.3.2 From 73e51a956cd0610e3e177819207097d173a05976 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sat, 20 Jun 2009 18:07:51 +0200 Subject: [PATCH 48/70] Remove dead assignment in mutt_parse_rcplist(). --- src/mutt.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/mutt.c b/src/mutt.c index d6b1dd0..28c57a1 100644 --- a/src/mutt.c +++ b/src/mutt.c @@ -214,7 +214,7 @@ static GSList *mutt_parse_rcplist( gchar *rcpList, gint *addrCount ) { pStart = rcpList; while( *pStart ) { ptr = pStart; - address = name = NULL; + address = NULL; pName = pAddr = NULL; /* Chew up spaces */ while( *ptr ) { -- 1.6.3.2 From c95dd84b8a1fc166659ce60c16d260bbf535b7a4 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sat, 20 Jun 2009 18:24:42 +0200 Subject: [PATCH 49/70] Remove write-only variable partial_recv. --- src/partial_download.c | 4 ---- 1 files changed, 0 insertions(+), 4 deletions(-) diff --git a/src/partial_download.c b/src/partial_download.c index 3623027..f33c076 100644 --- a/src/partial_download.c +++ b/src/partial_download.c @@ -71,7 +71,6 @@ int partial_msg_in_uidl_list(MsgInfo *msginfo) gchar uidl[POPBUFSIZE]; time_t recv_time; time_t now; - gint partial_recv; gchar *sanitized_uid = NULL; if (!msginfo->extradata) @@ -111,7 +110,6 @@ int partial_msg_in_uidl_list(MsgInfo *msginfo) gchar tmp[POPBUFSIZE]; strretchomp(buf); recv_time = RECV_TIME_NONE; - partial_recv = POP3_TOTALLY_RECEIVED; if (sscanf(buf, "%s\t%ld\t%s", uidl, (long int *) &recv_time, tmp) < 2) { @@ -385,7 +383,6 @@ gchar *partial_get_filename(const gchar *server, const gchar *login, gchar uidl[POPBUFSIZE]; time_t recv_time; time_t now; - gint partial_recv; gchar *sanitized_uid = g_strdup(login); subst_for_filename(sanitized_uid); @@ -415,7 +412,6 @@ gchar *partial_get_filename(const gchar *server, const gchar *login, gchar tmp[POPBUFSIZE]; strretchomp(buf); recv_time = RECV_TIME_NONE; - partial_recv = POP3_TOTALLY_RECEIVED; if (sscanf(buf, "%s\t%ld\t%s", uidl, (long int *) &recv_time, tmp) < 2) { -- 1.6.3.2 From 38462ea3fb2536d2e4359e1c08d262af6994be04 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sun, 28 Jun 2009 17:24:39 +0200 Subject: [PATCH 50/70] Remove write-only variable start_pos in printing_textview_cb_begin_print(). --- src/printing.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/src/printing.c b/src/printing.c index e8104ff..0933546 100644 --- a/src/printing.c +++ b/src/printing.c @@ -839,7 +839,6 @@ static void printing_textview_cb_begin_print(GtkPrintOperation *op, GtkPrintCont PangoFontDescription *desc; int start, ii; PangoLayoutIter *iter; - double start_pos; gint header_end_pos; gint num_header_lines; gint dummy; @@ -878,7 +877,6 @@ static void printing_textview_cb_begin_print(GtkPrintOperation *op, GtkPrintCont page_height = 0; start = 0; ii = 0; - start_pos = 0.; iter = pango_layout_get_iter(print_data->layout); /* find the last character of the header */ -- 1.6.3.2 From 2c61a7055d32dbfd6f807085536ac41451d820af Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sun, 28 Jun 2009 17:32:23 +0200 Subject: [PATCH 51/70] Remove write-only variable button in icon_window_button_press(). --- src/prefs_toolbar.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/src/prefs_toolbar.c b/src/prefs_toolbar.c index 55ddecc..e4456a9 100644 --- a/src/prefs_toolbar.c +++ b/src/prefs_toolbar.c @@ -1352,11 +1352,9 @@ static gboolean icon_window_button_press(GtkWidget *widget, GdkEventButton *event, ToolbarPage *prefs_toolbar ) { - GtkWidget *event_widget, *button; + GtkWidget *event_widget; gboolean restore = TRUE; - button = prefs_toolbar->icon_button; - /* Test where mouse was clicked */ event_widget = gtk_get_event_widget((GdkEvent *)event); if (event_widget != widget) { -- 1.6.3.2 From 444d63044cc2fade79ab4b3e92f3e1b4f8ccec1f Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sun, 28 Jun 2009 17:41:24 +0200 Subject: [PATCH 52/70] Remove write-only variable done in procmime_parse_multipart(). --- src/procmime.c | 5 +---- 1 files changed, 1 insertions(+), 4 deletions(-) diff --git a/src/procmime.c b/src/procmime.c index 2036b9d..08bb5d4 100644 --- a/src/procmime.c +++ b/src/procmime.c @@ -1542,7 +1542,6 @@ static void procmime_parse_multipart(MimeInfo *mimeinfo, gboolean short_scan) gchar buf[BUFFSIZE]; FILE *fp; int result = 0; - gboolean done = FALSE; boundary = g_hash_table_lookup(mimeinfo->typeparameters, "boundary"); if (!boundary) @@ -1573,10 +1572,8 @@ static void procmime_parse_multipart(MimeInfo *mimeinfo, gboolean short_scan) hentry[6].body, hentry[7].body, mimeinfo->data.filename, lastoffset, len, short_scan); - if (result == 1 && short_scan) { - done = TRUE; + if (result == 1 && short_scan) break; - } } if (buf[2 + boundary_len] == '-' && -- 1.6.3.2 From be7f0038c5049f8926a6437140199c33ed5f5def Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sun, 28 Jun 2009 17:42:55 +0200 Subject: [PATCH 53/70] Remove write-only variable local in procmsg_send_message_queue_full(). --- src/procmsg.c | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-) diff --git a/src/procmsg.c b/src/procmsg.c index ceda77d..d143ff4 100644 --- a/src/procmsg.c +++ b/src/procmsg.c @@ -1458,8 +1458,6 @@ static gint procmsg_send_message_queue_full(const gchar *file, gboolean keep_ses gboolean save_clear_text = TRUE; gchar *tmp_enc_file = NULL; - int local = 0; - cm_return_val_if_fail(file != NULL, -1); if ((fp = g_fopen(file, "rb")) == NULL) { @@ -1603,7 +1601,6 @@ send_mail: } else if (mailac && mailac->use_mail_command && mailac->mail_command && (* mailac->mail_command)) { mailval = send_message_local(mailac->mail_command, fp); - local = 1; } else { if (!mailac) { mailac = account_find_from_smtp_server(from, smtpserver); -- 1.6.3.2 From 6211e625654046b15a1226de4dd4793834cbcf9d Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sun, 28 Jun 2009 17:54:25 +0200 Subject: [PATCH 54/70] Remove adbase and cache in addressbook_perform_search(). --- src/addressbook.c | 5 ----- 1 files changed, 0 insertions(+), 5 deletions(-) diff --git a/src/addressbook.c b/src/addressbook.c index 3f91c60..8445fb3 100644 --- a/src/addressbook.c +++ b/src/addressbook.c @@ -4599,8 +4599,6 @@ static void addressbook_perform_search( AddressDataSource *ds, gchar *searchTerm, GtkCMCTreeNode *pNode ) { - AddrBookBase *adbase; - AddressCache *cache; ItemFolder *folder; gchar *name; gint queryID; @@ -4620,9 +4618,6 @@ static void addressbook_perform_search( else { return; } - /* Get reference to address cache */ - adbase = ( AddrBookBase * ) ds->rawDataSource; - cache = adbase->addressCache; /* Create a folder for the search results */ name = g_strdup_printf( _queryFolderLabel_, searchTerm ); -- 1.6.3.2 From 9fecd29531bc9e130ff81036d88f1ac59e4d12fa Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sun, 28 Jun 2009 17:59:53 +0200 Subject: [PATCH 55/70] How about we actually use rootFolder in addressbook_set_clist(). --- src/addressbook.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/addressbook.c b/src/addressbook.c index 8445fb3..69a39b2 100644 --- a/src/addressbook.c +++ b/src/addressbook.c @@ -3903,9 +3903,9 @@ static void addressbook_set_clist( AddressObject *obj, gboolean refresh ) { ItemFolder *rootFolder = NULL; rootFolder = addrindex_ds_get_root_folder( ds ); addressbook_folder_load_person( - ctreelist, addrindex_ds_get_root_folder( ds ) ); + ctreelist, rootFolder ); addressbook_folder_load_group( - ctreelist, addrindex_ds_get_root_folder( ds ) ); + ctreelist, rootFolder ); } } else { -- 1.6.3.2 From 64d18b9d609b6720427a99be437f89ce86e7951b Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sun, 28 Jun 2009 18:01:45 +0200 Subject: [PATCH 56/70] How about we actually use ads in addressbook_set_clist(). --- src/addressbook.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/addressbook.c b/src/addressbook.c index 69a39b2..f8b8a5e 100644 --- a/src/addressbook.c +++ b/src/addressbook.c @@ -3897,7 +3897,7 @@ static void addressbook_set_clist( AddressObject *obj, gboolean refresh ) { if( obj->type == ADDR_DATASOURCE ) { ads = ADAPTER_DSOURCE(obj); - ds = ADAPTER_DSOURCE(obj)->dataSource; + ds = ads->dataSource; if( ds ) { /* Load root folder */ ItemFolder *rootFolder = NULL; -- 1.6.3.2 From bdd2aaca5e1cdd8e78df945a0f90312977ed6544 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sun, 28 Jun 2009 18:12:41 +0200 Subject: [PATCH 57/70] Remove write-only variable row in addressbook_folder_refresh_one_person() --- src/addressbook.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/src/addressbook.c b/src/addressbook.c index f8b8a5e..afd5741 100644 --- a/src/addressbook.c +++ b/src/addressbook.c @@ -3730,11 +3730,9 @@ static void addressbook_folder_refresh_one_person( GtkCMCTree *clist, ItemPerson static void addressbook_folder_remove_one_person( GtkCMCTree *clist, ItemPerson *person ) { GtkCMCTreeNode *node; - gint row; if( person == NULL ) return; node = gtk_cmctree_find_by_row_data( clist, NULL, person ); - row = gtk_cmclist_find_row_from_data( GTK_CMCLIST(clist), person ); if( node ) { addressbook_folder_remove_node( clist, node ); } -- 1.6.3.2 From 685b7f8275ea470981c068eb7ed3ba49ea9827d6 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sun, 28 Jun 2009 18:29:49 +0200 Subject: [PATCH 58/70] Remove write-only variable i in imap_fetch_result_to_envelop_list() --- src/etpan/imap-thread.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/src/etpan/imap-thread.c b/src/etpan/imap-thread.c index ab21252..7d9b249 100644 --- a/src/etpan/imap-thread.c +++ b/src/etpan/imap-thread.c @@ -2677,10 +2677,8 @@ imap_fetch_result_to_envelop_list(clist * fetch_result, carray ** p_env_list) { clistiter * cur; - unsigned int i; carray * env_list; - i = 0; env_list = carray_new(16); if (fetch_result) { -- 1.6.3.2 From f366768a4f85ab05aa181bda158838205e7be173 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sun, 28 Jun 2009 18:37:38 +0200 Subject: [PATCH 59/70] Remove write-only variable textview in gboolean summary_key_pressed() --- src/summaryview.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/src/summaryview.c b/src/summaryview.c index d87a3cf..1c7f6f5 100644 --- a/src/summaryview.c +++ b/src/summaryview.c @@ -6332,7 +6332,6 @@ static gboolean summary_key_pressed(GtkWidget *widget, GdkEventKey *event, GtkCMCTree *ctree = GTK_CMCTREE(widget); GtkCMCTreeNode *node; MessageView *messageview; - TextView *textview; GtkAdjustment *adj; gboolean mod_pressed; @@ -6343,7 +6342,6 @@ static gboolean summary_key_pressed(GtkWidget *widget, GdkEventKey *event, return FALSE; messageview = summaryview->messageview; - textview = messageview->mimeview->textview; mod_pressed = ((event->state & (GDK_SHIFT_MASK|GDK_MOD1_MASK)) != 0); -- 1.6.3.2 From fcf8e1a231dca26622ebe2c3bc2553ea0eefe38a Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sun, 28 Jun 2009 18:41:07 +0200 Subject: [PATCH 60/70] Remove write-only variable id in summary_tags_menu_item_activate_item_cb() --- src/summaryview.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/src/summaryview.c b/src/summaryview.c index 1c7f6f5..a3fa8da 100644 --- a/src/summaryview.c +++ b/src/summaryview.c @@ -5724,7 +5724,6 @@ static void summary_tags_menu_item_activate_item_cb(GtkMenuItem *menu_item, for (; sel != NULL; sel = sel->next) { MsgInfo *msginfo; GSList *tags = NULL; - gint id; GtkCheckMenuItem *item; msginfo = gtk_cmctree_node_get_row_data (GTK_CMCTREE(summaryview->ctree), @@ -5737,7 +5736,6 @@ static void summary_tags_menu_item_activate_item_cb(GtkMenuItem *menu_item, for (; tags; tags = tags->next) { gint num_checked = GPOINTER_TO_INT(g_hash_table_lookup(menu_allsel_table, tags->data)); - id = GPOINTER_TO_INT(tags->data); item = g_hash_table_lookup(menu_table, GINT_TO_POINTER(tags->data)); if (item && !item->active) { gtk_check_menu_item_set_active -- 1.6.3.2 From 641cfd2f4c58f09be94edde98b8cca025878ff1f Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sun, 28 Jun 2009 18:44:44 +0200 Subject: [PATCH 61/70] Remove write-only variable changed in summary_lock_row() --- src/summaryview.c | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-) diff --git a/src/summaryview.c b/src/summaryview.c index a3fa8da..76441a9 100644 --- a/src/summaryview.c +++ b/src/summaryview.c @@ -3779,7 +3779,6 @@ static void summary_mark_row(SummaryView *summaryview, GtkCMCTreeNode *row) static void summary_lock_row(SummaryView *summaryview, GtkCMCTreeNode *row) { - gboolean changed = FALSE; GtkCMCTree *ctree = GTK_CMCTREE(summaryview->ctree); MsgInfo *msginfo; @@ -3789,11 +3788,9 @@ static void summary_lock_row(SummaryView *summaryview, GtkCMCTreeNode *row) summaryview->deleted--; if (MSG_IS_MOVE(msginfo->flags)) { summaryview->moved--; - changed = TRUE; } if (MSG_IS_COPY(msginfo->flags)) { summaryview->copied--; - changed = TRUE; } procmsg_msginfo_set_to_folder(msginfo, NULL); summary_msginfo_change_flags(msginfo, MSG_LOCKED, 0, MSG_DELETED, -- 1.6.3.2 From 73bc5fb100a653502cceecfc1a5c2136cbf103bd Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sun, 28 Jun 2009 18:55:08 +0200 Subject: [PATCH 62/70] Fix a NULL pointer dereference in vcard_build_items(), assuming the check is necessary. --- src/vcard.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/vcard.c b/src/vcard.c index 4ae3dc5..fec0018 100644 --- a/src/vcard.c +++ b/src/vcard.c @@ -345,8 +345,8 @@ static void vcard_build_items( if( *str != '\0' ) { ItemEMail *email = addritem_create_item_email(); addritem_email_set_address( email, str ); - str = nodeRemarks->data; if( nodeRemarks ) { + str = nodeRemarks->data; if( str ) { if( g_utf8_collate( str, "internet" ) != 0 ) { if( *str != '\0' ) -- 1.6.3.2 From e828d4037b448f24855897377aec370e34784fa1 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sun, 28 Jun 2009 19:58:09 +0200 Subject: [PATCH 63/70] Fix a maybe theoretical NULL pointer dereference. --- src/news.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/news.c b/src/news.c index 0d12cf4..aeeedb7 100644 --- a/src/news.c +++ b/src/news.c @@ -849,7 +849,7 @@ static gchar *news_parse_xhdr(clist *hdrlist, MsgInfo *msginfo) return NULL; hdr = clist_content(clist_begin(hdrlist)); - if (hdr->hdr_article != msginfo->msgnum) + if (!hdr || hdr->hdr_article != msginfo->msgnum) return NULL; return g_strdup(hdr->hdr_value); } -- 1.6.3.2 From bf07b2ec92a860eec04269c7e128a64a7822b7a5 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sun, 28 Jun 2009 20:09:54 +0200 Subject: [PATCH 64/70] Fix a NULL pointer dereference in mutt_parse_rcplist() if no closing parenthesis is found. --- src/mutt.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/mutt.c b/src/mutt.c index 28c57a1..3efd9ce 100644 --- a/src/mutt.c +++ b/src/mutt.c @@ -212,7 +212,7 @@ static GSList *mutt_parse_rcplist( gchar *rcpList, gint *addrCount ) { list = NULL; cnt = 0; pStart = rcpList; - while( *pStart ) { + while( pStart && *pStart ) { ptr = pStart; address = NULL; pName = pAddr = NULL; -- 1.6.3.2 From ad48698d6ebae020298860510b72d9603bde8771 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sun, 28 Jun 2009 20:45:12 +0200 Subject: [PATCH 65/70] Fix a NULL pointer dereference in inc_finished(). --- src/inc.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/inc.c b/src/inc.c index 4bdeaec..0c0c418 100644 --- a/src/inc.c +++ b/src/inc.c @@ -170,7 +170,7 @@ static void inc_finished(MainWindow *mainwin, gboolean new_messages, gboolean au if (cur_account && cur_account->inbox) item = folder_find_item_from_identifier(cur_account->inbox); - if (item == NULL && cur_account->folder) + if (item == NULL && cur_account && cur_account->folder) item = cur_account->folder->inbox; if (item == NULL) item = folder_get_default_inbox(); -- 1.6.3.2 From f685a03d92dd762aac565929c8046dd09d53a7f1 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sun, 28 Jun 2009 21:00:03 +0200 Subject: [PATCH 66/70] Fix a cm_return_if_fail() condition in addritem_person_remove_attribute(). --- src/addritem.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/addritem.c b/src/addritem.c index 91a45cc..1cfe846 100644 --- a/src/addritem.c +++ b/src/addritem.c @@ -589,7 +589,7 @@ void addritem_person_add_attribute( * \param attrib Attribute to remove. */ void addritem_person_remove_attribute( ItemPerson *person, const gchar *attrib ) { - cm_return_if_fail( person != NULL || attrib != NULL ); + cm_return_if_fail( person != NULL && attrib != NULL ); GList *attrib_list; attrib_list = person->listAttrib; -- 1.6.3.2 From 6643b8f15f9f398b297876373f709fd7a6e65f15 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Mon, 29 Jun 2009 14:57:41 +0200 Subject: [PATCH 67/70] Fix two NULL pointer dereferences in addressbook_treenode_delete_cb(). --- src/addressbook.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/addressbook.c b/src/addressbook.c index afd5741..3d28e2c 100644 --- a/src/addressbook.c +++ b/src/addressbook.c @@ -2926,7 +2926,7 @@ static void addressbook_treenode_delete_cb(GtkAction *action, gpointer data) /* Confirm deletion */ delType = ADDRTREE_DEL_NONE; if( obj->type == ADDR_ITEM_FOLDER ) { - if( iface->externalQuery ) { + if( iface && iface->externalQuery ) { message = g_strdup_printf( _( "Do you want to delete the query " \ "results and addresses in '%s' ?" ), @@ -2989,7 +2989,7 @@ static void addressbook_treenode_delete_cb(GtkAction *action, gpointer data) cache = adbase->addressCache; /* Remove query results folder */ - if( iface->externalQuery ) { + if( iface && iface->externalQuery ) { AdapterFolder *adapter = ADAPTER_FOLDER(obj); ItemFolder *folder = adapter->itemFolder; -- 1.6.3.2 From 406b6c25724bf4a2a4560d0dafbcafc44c0e5f44 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Mon, 29 Jun 2009 17:03:44 +0200 Subject: [PATCH 68/70] Streamline create_description()'s prototype. It doesn't sue pass_hint for anything useful. --- src/plugins/pgpcore/passphrase.c | 13 ++++--------- 1 files changed, 4 insertions(+), 9 deletions(-) diff --git a/src/plugins/pgpcore/passphrase.c b/src/plugins/pgpcore/passphrase.c index c348f6b..1155fc3 100644 --- a/src/plugins/pgpcore/passphrase.c +++ b/src/plugins/pgpcore/passphrase.c @@ -58,8 +58,7 @@ static gint passphrase_deleted(GtkWidget *widget, GdkEventAny *event, static gboolean passphrase_key_pressed(GtkWidget *widget, GdkEventKey *event, gpointer data); -static GtkWidget *create_description(const gchar *uid_hint, - const gchar *pass_hint, gint prev_bad, gint new_key); +static GtkWidget *create_description(const gchar *uid_hint, gint prev_bad, gint new_key); void gpgmegtk_set_passphrase_grab(gint yes) @@ -101,7 +100,7 @@ passphrase_mbox(const gchar *uid_hint, const gchar *pass_hint, gint prev_bad, gi if (uid_hint || pass_hint) { GtkWidget *label, *icon; - label = create_description (uid_hint, pass_hint, prev_bad, new_key); + label = create_description (uid_hint, prev_bad, new_key); icon = gtk_image_new_from_stock(GTK_STOCK_DIALOG_AUTHENTICATION, GTK_ICON_SIZE_DIALOG); @@ -242,9 +241,9 @@ linelen (const gchar *s) } static GtkWidget * -create_description(const gchar *uid_hint, const gchar *pass_hint, gint prev_bad, gint new_key) +create_description(const gchar *uid_hint, gint prev_bad, gint new_key) { - const gchar *uid = NULL, *info = NULL; + const gchar *uid = NULL; gchar *buf; GtkWidget *label; gchar *my_uid = NULL; @@ -252,10 +251,6 @@ create_description(const gchar *uid_hint, const gchar *pass_hint, gint prev_bad, uid = _("[no user id]"); else uid = uid_hint; - if (!pass_hint) - info = ""; - else - info = pass_hint; my_uid = g_strdup(uid); while (strchr(my_uid, '<')) -- 1.6.3.2 From 62675efe675e31717f76826f56496e98367bc9cd Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Mon, 29 Jun 2009 17:05:42 +0200 Subject: [PATCH 69/70] Remove the write-only variable validity in sgpgme_verify_signature(). --- src/plugins/pgpcore/sgpgme.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/src/plugins/pgpcore/sgpgme.c b/src/plugins/pgpcore/sgpgme.c index 6a2767a..98c60fc 100644 --- a/src/plugins/pgpcore/sgpgme.c +++ b/src/plugins/pgpcore/sgpgme.c @@ -84,7 +84,6 @@ gpgme_verify_result_t sgpgme_verify_signature(gpgme_ctx_t ctx, gpgme_data_t sig, SignatureStatus sgpgme_sigstat_gpgme_to_privacy(gpgme_ctx_t ctx, gpgme_verify_result_t status) { - unsigned long validity = 0; gpgme_signature_t sig = NULL; if (GPOINTER_TO_INT(status) == -GPG_ERR_SYSTEM_ERROR) { @@ -102,7 +101,6 @@ SignatureStatus sgpgme_sigstat_gpgme_to_privacy(gpgme_ctx_t ctx, gpgme_verify_re debug_print("sig == NULL\n"); return SIGNATURE_UNCHECKED; } - validity = sig->validity; debug_print("err code %d\n", gpg_err_code(sig->status)); switch (gpg_err_code(sig->status)) { -- 1.6.3.2 From 2a53cf7fbb2beec32c74aee5e5927bc1156d453f Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Mon, 29 Jun 2009 17:20:18 +0200 Subject: [PATCH 70/70] In procmsg_list_sort_by_account(), give nothing_to_sort the actual chance to be FALSE when its checked. XXX: This is a guess. --- src/procmsg.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/procmsg.c b/src/procmsg.c index d143ff4..f6a0ea5 100644 --- a/src/procmsg.c +++ b/src/procmsg.c @@ -773,7 +773,6 @@ static GSList *procmsg_list_sort_by_account(FolderItem *queue, GSList *list) debug_print("\n"); parse_again: - nothing_to_sort = TRUE; cur = orig; while (cur) { gchar *file = NULL; @@ -790,6 +789,7 @@ parse_again: nothing_to_sort = FALSE; goto parse_again; } + nothing_to_sort = TRUE; cur = cur->next; } -- 1.6.3.2