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