Created attachment 700 [details] tarball with patches against claws-mail-3.7.2cvs11 The attached tarball contains patches for a couple of clang warnings. Most of them are cosmetics, but the first ones could fix actual bugs (mostly crashes due to dereferenced NULL pointers). I've been using the patches since 3.7.1 without any problems, but as I only use Claws Mail for mails, some of them are only compile-tested. Occasionally I had to guess the proper fix, so some of them may be wrong. Even the incorrect ones should be useful to highlight the problem, though.
Phew, that's a rather huge "couple" :-) Could you rework the tarball so that patches for the same kind of error are in the same file ? (and put the "unsure" ones in another file) Thanks a lot!
Will do. Probably not before the weekend, though.
Created attachment 704 [details] Second try, rebased on 3.7.2cvs15, patches grouped together I rebased the patches on 3.7.2cvs15 and sorted them into six files. style-compliance.diff doesn't fix any warnings and may not be worth it out of context, but I included it anyway.
I just tried the patches against 3.7.4. All apply cleanly except two that are no longer necessary.
Changes related to this bug have been committed. Please check latest CVS and update the bug accordingly. You can also get the patch from: http://www.claws-mail.org/tracker/ 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
Changes related to this bug have been committed. Please check latest CVS and update the bug accordingly. You can also get the patch from: http://www.claws-mail.org/tracker/ 2012-09-12 [colin] 3.8.1cvs52 * src/addressbook.c * src/addrharvest.c * src/addrindex.c * src/addritem.c * src/compose.c * src/edittags.c * src/folder.c * src/imap.c * src/inc.c * src/ldif.c * src/mainwindow.c * src/mbox.c * src/mimeview.c * src/mutt.c * src/partial_download.c * src/prefs_filtering_action.c * src/prefs_toolbar.c * src/printing.c * src/procheader.c * src/procmime.c * src/procmsg.c * src/summaryview.c * src/textview.c * src/common/utils.c * src/etpan/imap-thread.c * src/gtk/gtkaspell.c * src/plugins/pgpcore/sgpgme.c More fixes from bug #1961: - Write-only variables - Null pointer dereferences - A couple other fixes for which the reporter was unsure, but which showed problems. More details in bug #1961 comments.
Hi, Better late than never... Patches applied. A few comments about unsure-ones.diff: Subject: [PATCH 02/10] In procmsg_list_sort_by_account(), give nothing_to_sort the chance to be FALSE when it's checked. XXX: This is a guess. Initially applied but I reverted it, I don't remember what this is supposed to do :) Subject: [PATCH 03/10] Not sure about this one, but otherwise w_hbox would have no purpose. w_hbox had no purpose :) Subject: [PATCH 07/10] Remove interim variable tags. Maybe tmp should be renamed to tags. In fact tags was there to keep the pointer at the start of the list in order to free it. This was a leak. Subject: [PATCH 09/10] Remove write-only variable is_group. Kept it, I find it makes the if logic more clear Thanks for your patches !