talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit e17a222d124381a898e899103e64dab3889b61eb
parent 68d1e703ead5e695212b7527fb8f711785e62f69
Author: Colin Leroy <colin@colino.net>
Date:   Wed, 12 Sep 2012 08:52:47 +0000

2012-09-12 [colin]	3.8.1cvs51

	* src/compose.c
	* src/mh.c
	* src/common/ssl.c
	* src/plugins/pgpcore/passphrase.c
		Apply patches from bug #1961, "patches for
		a couple of clang warnings":
		- Check return codes
		- Remove dead code

Diffstat:
MChangeLog | 11+++++++++++
MPATCHSETS | 1+
Mconfigure.ac | 2+-
Msrc/common/ssl.c | 2+-
Msrc/compose.c | 7++-----
Msrc/mh.c | 6------
Msrc/plugins/pgpcore/passphrase.c | 13++++---------
7 files changed, 20 insertions(+), 22 deletions(-)

diff --git a/ChangeLog b/ChangeLog @@ -1,3 +1,14 @@ +2012-09-12 [colin] 3.8.1cvs51 + + * src/compose.c + * src/mh.c + * src/common/ssl.c + * src/plugins/pgpcore/passphrase.c + Apply patches from bug #1961, "patches for + a couple of clang warnings": + - Check return codes + - Remove dead code + 2012-09-12 [colin] 3.8.1cvs50 * claws-mail.pc.in diff --git a/PATCHSETS b/PATCHSETS @@ -4425,3 +4425,4 @@ ( cvs diff -u -r 1.115.2.254 -r 1.115.2.255 src/main.c; ) > 3.8.1cvs48.patchset ( cvs diff -u -r 1.115.2.255 -r 1.115.2.256 src/main.c; ) > 3.8.1cvs49.patchset ( cvs diff -u -r 1.1.2.3 -r 1.1.2.4 claws-mail.pc.in; ) > 3.8.1cvs50.patchset +( cvs diff -u -r 1.382.2.610 -r 1.382.2.611 src/compose.c; cvs diff -u -r 1.79.2.75 -r 1.79.2.76 src/mh.c; cvs diff -u -r 1.9.2.55 -r 1.9.2.56 src/common/ssl.c; cvs diff -u -r 1.1.2.37 -r 1.1.2.38 src/plugins/pgpcore/passphrase.c; ) > 3.8.1cvs51.patchset diff --git a/configure.ac b/configure.ac @@ -12,7 +12,7 @@ MINOR_VERSION=8 MICRO_VERSION=1 INTERFACE_AGE=0 BINARY_AGE=0 -EXTRA_VERSION=50 +EXTRA_VERSION=51 EXTRA_RELEASE= EXTRA_GTK2_VERSION= diff --git a/src/common/ssl.c b/src/common/ssl.c @@ -316,7 +316,7 @@ gboolean ssl_init_socket_with_method(SockInfo *sockinfo, SSLMethod method) r = gnutls_certificate_verify_peers2(session, &status); - if (!ssl_certificate_check(cert, status, sockinfo->hostname, sockinfo->port)) { + if (r < 0 || !ssl_certificate_check(cert, status, sockinfo->hostname, sockinfo->port)) { gnutls_x509_crt_deinit(cert); gnutls_certificate_free_credentials(xcred); gnutls_deinit(session); diff --git a/src/compose.c b/src/compose.c @@ -1807,11 +1807,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); @@ -5897,6 +5892,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"); lock = FALSE; fclose(fp); claws_unlink(tmp); diff --git a/src/mh.c b/src/mh.c @@ -465,7 +465,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; @@ -574,11 +573,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) { if (g_hash_table_lookup(relation, msginfo) != NULL) diff --git 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) @@ -102,7 +101,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); @@ -244,9 +243,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; @@ -254,10 +253,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, '<'))