--- /dev/null
+Return-Path: <m.walters@qmul.ac.uk>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by olra.theworths.org (Postfix) with ESMTP id B236F431FBC\r
+ for <notmuch@notmuchmail.org>; Thu, 11 Apr 2013 23:12:39 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -1.098\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-1.098 tagged_above=-999 required=5\r
+ tests=[DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_FROM=0.001,\r
+ NML_ADSP_CUSTOM_MED=1.2, RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+ by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id XsArnGFKpNZx for <notmuch@notmuchmail.org>;\r
+ Thu, 11 Apr 2013 23:12:35 -0700 (PDT)\r
+Received: from mail2.qmul.ac.uk (mail2.qmul.ac.uk [138.37.6.6])\r
+ (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\r
+ (No client certificate requested)\r
+ by olra.theworths.org (Postfix) with ESMTPS id DC977431FAE\r
+ for <notmuch@notmuchmail.org>; Thu, 11 Apr 2013 23:12:34 -0700 (PDT)\r
+Received: from smtp.qmul.ac.uk ([138.37.6.40])\r
+ by mail2.qmul.ac.uk with esmtp (Exim 4.71)\r
+ (envelope-from <m.walters@qmul.ac.uk>)\r
+ id 1UQXDo-0007xv-59; Fri, 12 Apr 2013 07:12:28 +0100\r
+Received: from 93-97-24-31.zone5.bethere.co.uk ([93.97.24.31] helo=localhost)\r
+ by smtp.qmul.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.71)\r
+ (envelope-from <m.walters@qmul.ac.uk>)\r
+ id 1UQXDn-0003rY-SU; Fri, 12 Apr 2013 07:12:28 +0100\r
+From: Mark Walters <markwalters1009@gmail.com>\r
+To: Jani Nikula <jani@nikula.org>, notmuch@notmuchmail.org\r
+Subject: Re: [PATCH] cli: mime node: fix compiler warning when building\r
+ against gmime 2.4\r
+In-Reply-To: <1365248863-17947-1-git-send-email-jani@nikula.org>\r
+References: <1365248863-17947-1-git-send-email-jani@nikula.org>\r
+User-Agent: Notmuch/0.14+255~gff3cc55 (http://notmuchmail.org) Emacs/23.4.1\r
+ (x86_64-pc-linux-gnu)\r
+Date: Fri, 12 Apr 2013 07:12:45 +0100\r
+Message-ID: <87a9p4l1k2.fsf@qmul.ac.uk>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=utf-8\r
+Content-Transfer-Encoding: quoted-printable\r
+X-Sender-Host-Address: 93.97.24.31\r
+X-QM-SPAM-Info: Sender has good ham record. :)\r
+X-QM-Body-MD5: dc4ba2a33ad66402fe82002e2247208c (of first 20000 bytes)\r
+X-SpamAssassin-Score: -2.3\r
+X-SpamAssassin-SpamBar: --\r
+X-SpamAssassin-Report: The QM spam filters have analysed this message to\r
+ determine if it is\r
+ spam. We require at least 5.0 points to mark a message as spam.\r
+ This message scored -2.3 points.\r
+ Summary of the scoring: \r
+ * -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/,\r
+ * medium trust\r
+ * [138.37.6.40 listed in list.dnswl.org]\r
+ * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail\r
+ provider * (markwalters1009[at]gmail.com)\r
+X-QM-Scan-Virus: ClamAV says the message is clean\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Fri, 12 Apr 2013 06:12:40 -0000\r
+\r
+\r
+On Sat, 06 Apr 2013, Jani Nikula <jani@nikula.org> wrote:\r
+> commit d487ef9e58bcd193118f19f771d5ef3984616be5\r
+> Author: Jani Nikula <jani@nikula.org>\r
+> Date: Sat Mar 30 15:53:16 2013 +0200\r
+>\r
+> cli: mime node: abstract decryption and signature verification\r
+>\r
+> introduced a compiler warning, reported by Mark Walters, when building\r
+> against gmime 2.4:\r
+>\r
+> mime-node.c:224:9: warning: assignment discards =E2=80=98const=E2=80=99 q=\r
+ualifier from\r
+> pointer target type [enabled by default]\r
+>\r
+> Pass the non-const signature validity to the destructor to fix this.\r
+>\r
+> ---\r
+>\r
+> Not even compile tested as I don't have gmime 2.4 on any\r
+> systems... Mark, please build and run the tests with this. Thanks.\r
+\r
+This fixes the build warning and all tests pass. Thanks!\r
+\r
+Mark\r
+\r
+> ---\r
+> mime-node.c | 13 ++++++++-----\r
+> 1 file changed, 8 insertions(+), 5 deletions(-)\r
+>\r
+> diff --git a/mime-node.c b/mime-node.c\r
+> index 851f963..fd9e4a4 100644\r
+> --- a/mime-node.c\r
+> +++ b/mime-node.c\r
+> @@ -217,11 +217,12 @@ _signature_validity_free (GMimeSignatureValidity **=\r
+proxy)\r
+>=20=20\r
+> /* Set up signature validity destructor (GMime 2.4) */\r
+> static void\r
+> -set_signature_validity_destructor (mime_node_t *node)\r
+> +set_signature_validity_destructor (mime_node_t *node,\r
+> + GMimeSignatureValidity *sig_validity)\r
+> {\r
+> GMimeSignatureValidity **proxy =3D talloc (node, GMimeSignatureValid=\r
+ity *);\r
+> if (proxy) {\r
+> - *proxy =3D node->sig_validity;\r
+> + *proxy =3D sig_validity;\r
+> talloc_set_destructor (proxy, _signature_validity_free);\r
+> }\r
+> }\r
+> @@ -232,12 +233,14 @@ node_verify (mime_node_t *node, GMimeObject *part,\r
+> notmuch_crypto_context_t *cryptoctx)\r
+> {\r
+> GError *err =3D NULL;\r
+> + GMimeSignatureValidity *sig_validity;\r
+>=20=20\r
+> node->verify_attempted =3D TRUE;\r
+> - node->sig_validity =3D g_mime_multipart_signed_verify\r
+> + sig_validity =3D g_mime_multipart_signed_verify\r
+> (GMIME_MULTIPART_SIGNED (part), cryptoctx, &err);\r
+> - if (node->sig_validity) {\r
+> - set_signature_validity_destructor (node);\r
+> + node->sig_validity =3D sig_validity;\r
+> + if (sig_validity) {\r
+> + set_signature_validity_destructor (node, sig_validity);\r
+> } else {\r
+> fprintf (stderr, "Failed to verify signed part: %s\n",\r
+> err ? err->message : "no error explanation given");\r
+> --=20\r
+> 1.7.10.4\r