Re: [PATCH 4/6] Fix the COERCE_STATUS macro
authorAustin Clements <amdragon@MIT.EDU>
Mon, 24 Sep 2012 17:44:57 +0000 (13:44 +2000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:49:36 +0000 (09:49 -0800)
1b/5fb44801fef4dcbf748a0617ea18f6c67215e1 [new file with mode: 0644]

diff --git a/1b/5fb44801fef4dcbf748a0617ea18f6c67215e1 b/1b/5fb44801fef4dcbf748a0617ea18f6c67215e1
new file mode 100644 (file)
index 0000000..7a11308
--- /dev/null
@@ -0,0 +1,122 @@
+Return-Path: <amdragon@mit.edu>\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 ECF6F431FC0\r
+       for <notmuch@notmuchmail.org>; Mon, 24 Sep 2012 10:45:02 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_DNSWL_LOW=-0.7] 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 dhKqUfCmZEmM for <notmuch@notmuchmail.org>;\r
+       Mon, 24 Sep 2012 10:45:01 -0700 (PDT)\r
+Received: from dmz-mailsec-scanner-1.mit.edu (DMZ-MAILSEC-SCANNER-1.MIT.EDU\r
+       [18.9.25.12])\r
+       by olra.theworths.org (Postfix) with ESMTP id 72918431FAF\r
+       for <notmuch@notmuchmail.org>; Mon, 24 Sep 2012 10:45:01 -0700 (PDT)\r
+X-AuditID: 1209190c-b7f286d000000ee3-71-50609c1c9b2c\r
+Received: from mailhub-auth-2.mit.edu ( [18.7.62.36])\r
+       by dmz-mailsec-scanner-1.mit.edu (Symantec Messaging Gateway) with SMTP\r
+       id 5C.E5.03811.C1C90605; Mon, 24 Sep 2012 13:45:00 -0400 (EDT)\r
+Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])\r
+       by mailhub-auth-2.mit.edu (8.13.8/8.9.2) with ESMTP id q8OHixLD005335; \r
+       Mon, 24 Sep 2012 13:45:00 -0400\r
+Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91])\r
+       (authenticated bits=0)\r
+       (User authenticated as amdragon@ATHENA.MIT.EDU)\r
+       by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id q8OHivf5015432\r
+       (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);\r
+       Mon, 24 Sep 2012 13:44:58 -0400 (EDT)\r
+Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.77)\r
+       (envelope-from <amdragon@mit.edu>)\r
+       id 1TGCiH-0004Uv-9k; Mon, 24 Sep 2012 13:44:57 -0400\r
+Date: Mon, 24 Sep 2012 13:44:57 -0400\r
+From: Austin Clements <amdragon@MIT.EDU>\r
+To: Justus Winter <4winter@informatik.uni-hamburg.de>\r
+Subject: Re: [PATCH 4/6] Fix the COERCE_STATUS macro\r
+Message-ID: <20120924174457.GK26662@mit.edu>\r
+References: <873927eb5i.fsf@convex-new.cs.unb.ca>\r
+       <1348500080-29726-1-git-send-email-4winter@informatik.uni-hamburg.de>\r
+       <1348500080-29726-4-git-send-email-4winter@informatik.uni-hamburg.de>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+Content-Disposition: inline\r
+In-Reply-To:\r
+ <1348500080-29726-4-git-send-email-4winter@informatik.uni-hamburg.de>\r
+User-Agent: Mutt/1.5.21 (2010-09-15)\r
+X-Brightmail-Tracker:\r
+ H4sIAAAAAAAAA+NgFmphleLIzCtJLcpLzFFi42IRYrdT0ZWZkxBg8OKLtcXs1h9MFtdvzmR2\r
+       YPKYeP40m8ezVbeYA5iiuGxSUnMyy1KL9O0SuDK+z9rHWtDEVzG39S1bA+NCri5GDg4JAROJ\r
+       XU9cuhg5gUwxiQv31rN1MXJxCAnsY5TY9nEfC4SzgVGi789zqMxJJonvn/uYIZwljBJnvn1h\r
+       BelnEVCVmLrlCiOIzSagIbFt/3IwW0TAVGLDgwfsIDazgLTEt9/NTCC2MNDqw9vbwWxeAR2J\r
+       j99nskIMPcgo0fjhJCNEQlDi5MwnLBDNWhI3/r1kArkbZNDyfxwgYU6BIImvXb1g80UFVCSm\r
+       nNzGNoFRaBaS7llIumchdC9gZF7FKJuSW6Wbm5iZU5yarFucnJiXl1qka6iXm1mil5pSuokR\r
+       FNickjw7GN8cVDrEKMDBqMTDe6M1IUCINbGsuDL3EKMkB5OSKK/vdKAQX1J+SmVGYnFGfFFp\r
+       TmrxIUYJDmYlEd4rXUA53pTEyqrUonyYlDQHi5I47+WUm/5CAumJJanZqakFqUUwWRkODiUJ\r
+       3puzgBoFi1LTUyvSMnNKENJMHJwgw3mAhvPPBhleXJCYW5yZDpE/xagoJc77CqRZACSRUZoH\r
+       1wtLPK8YxYFeEeblBWnnASYtuO5XQIOZQAbviQMZXJKIkJJqYEz+ey65TmBhvk7R7AXXV31l\r
+       YNHL+nO0LHTGeVbu39edhNs+iGnfr/QMZ2Gb87hbYO9U2fDezRZBCcs49ON39b1NtUkLrQph\r
+       3Jcy5+p7Y5vayIRb3jMDrZ3dd9x2iLVuPLd6vUq64bUnE2zUVJhtJ044IvqD78HfaetjFzR8\r
+       /flwyvq8i6WFaUosxRmJhlrMRcWJAInNM+UXAwAA\r
+Cc: notmuch@notmuchmail.org\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: Mon, 24 Sep 2012 17:45:03 -0000\r
+\r
+Quoth Justus Winter on Sep 24 at  5:21 pm:\r
+> Fix the COERCE_STATUS macro to handle _internal_error being declared\r
+> as void function.\r
+> \r
+> Note that the function _internal_error does not return. Evaluating to\r
+> NOTMUCH_STATUS_SUCCESS is done purely to appease the compiler.\r
+> \r
+> Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>\r
+> ---\r
+>  lib/notmuch-private.h |   10 +++++++---\r
+>  1 file changed, 7 insertions(+), 3 deletions(-)\r
+> \r
+> diff --git a/lib/notmuch-private.h b/lib/notmuch-private.h\r
+> index bfb4111..7a409f5 100644\r
+> --- a/lib/notmuch-private.h\r
+> +++ b/lib/notmuch-private.h\r
+> @@ -136,13 +136,17 @@ typedef enum _notmuch_private_status {\r
+>   * to or greater than NOTMUCH_STATUS_LAST_STATUS. (The idea here is\r
+>   * that the caller has previously handled any expected\r
+>   * notmuch_private_status_t values.)\r
+> + *\r
+> + * Note that the function _internal_error does not return. Evaluating\r
+> + * to NOTMUCH_STATUS_SUCCESS is done purely to appease the compiler.\r
+>   */\r
+>  #define COERCE_STATUS(private_status, format, ...)                  \\r
+>      ((private_status >= (notmuch_private_status_t) NOTMUCH_STATUS_LAST_STATUS)\\r
+>       ?                                                                      \\r
+> -     (notmuch_status_t) _internal_error (format " (%s).\n",         \\r
+> -                                         ##__VA_ARGS__,                     \\r
+> -                                         __location__)                      \\r
+> +     _internal_error (format " (%s).\n",                            \\r
+> +                      ##__VA_ARGS__,                                        \\r
+> +                      __location__),                                        \\r
+> +     (notmuch_status_t) NOTMUCH_PRIVATE_STATUS_SUCCESS                      \\r
+\r
+Just a nit: why not simply NOTMUCH_STATUS_SUCCESS?\r
+\r
+Otherwise, this series LGTM.  No need to roll another version just for\r
+this comment.\r
+\r
+>       :                                                                      \\r
+>       (notmuch_status_t) private_status)\r
+>  \r