1 Return-Path: <tomi.ollila@iki.fi>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id 473FB431FC0
\r
6 for <notmuch@notmuchmail.org>; Tue, 25 Sep 2012 01:55:19 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]
\r
13 Received: from olra.theworths.org ([127.0.0.1])
\r
14 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id ZbRjFnU-fXMH for <notmuch@notmuchmail.org>;
\r
16 Tue, 25 Sep 2012 01:55:18 -0700 (PDT)
\r
17 Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])
\r
18 by olra.theworths.org (Postfix) with ESMTP id 28728431FAF
\r
19 for <notmuch@notmuchmail.org>; Tue, 25 Sep 2012 01:55:18 -0700 (PDT)
\r
20 Received: from guru.guru-group.fi (localhost [IPv6:::1])
\r
21 by guru.guru-group.fi (Postfix) with ESMTP id 5DE7C10014A;
\r
22 Tue, 25 Sep 2012 11:55:22 +0300 (EEST)
\r
23 From: Tomi Ollila <tomi.ollila@iki.fi>
\r
24 To: Austin Clements <amdragon@MIT.EDU>,
\r
25 Justus Winter <4winter@informatik.uni-hamburg.de>
\r
26 Subject: Re: [PATCH 4/6] Fix the COERCE_STATUS macro
\r
27 In-Reply-To: <20120924174457.GK26662@mit.edu>
\r
28 References: <873927eb5i.fsf@convex-new.cs.unb.ca>
\r
29 <1348500080-29726-1-git-send-email-4winter@informatik.uni-hamburg.de>
\r
30 <1348500080-29726-4-git-send-email-4winter@informatik.uni-hamburg.de>
\r
31 <20120924174457.GK26662@mit.edu>
\r
32 User-Agent: Notmuch/0.13.2+177~g6720ee8 (http://notmuchmail.org) Emacs/24.2.1
\r
33 (x86_64-unknown-linux-gnu)
\r
34 X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL
\r
35 $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F
\r
36 !)g;OY^,BjTbr)Np:%c_o'jj,Z
\r
37 Date: Tue, 25 Sep 2012 11:55:21 +0300
\r
38 Message-ID: <m28vbya3d2.fsf@guru.guru-group.fi>
\r
40 Content-Type: text/plain
\r
41 Cc: notmuch@notmuchmail.org
\r
42 X-BeenThere: notmuch@notmuchmail.org
\r
43 X-Mailman-Version: 2.1.13
\r
45 List-Id: "Use and development of the notmuch mail system."
\r
46 <notmuch.notmuchmail.org>
\r
47 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
48 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
49 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
50 List-Post: <mailto:notmuch@notmuchmail.org>
\r
51 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
52 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
53 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
54 X-List-Received-Date: Tue, 25 Sep 2012 08:55:19 -0000
\r
56 On Mon, Sep 24 2012, Austin Clements <amdragon@MIT.EDU> wrote:
\r
58 > Quoth Justus Winter on Sep 24 at 5:21 pm:
\r
59 >> Fix the COERCE_STATUS macro to handle _internal_error being declared
\r
60 >> as void function.
\r
62 >> Note that the function _internal_error does not return. Evaluating to
\r
63 >> NOTMUCH_STATUS_SUCCESS is done purely to appease the compiler.
\r
65 >> Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
\r
67 >> lib/notmuch-private.h | 10 +++++++---
\r
68 >> 1 file changed, 7 insertions(+), 3 deletions(-)
\r
70 >> diff --git a/lib/notmuch-private.h b/lib/notmuch-private.h
\r
71 >> index bfb4111..7a409f5 100644
\r
72 >> --- a/lib/notmuch-private.h
\r
73 >> +++ b/lib/notmuch-private.h
\r
74 >> @@ -136,13 +136,17 @@ typedef enum _notmuch_private_status {
\r
75 >> * to or greater than NOTMUCH_STATUS_LAST_STATUS. (The idea here is
\r
76 >> * that the caller has previously handled any expected
\r
77 >> * notmuch_private_status_t values.)
\r
79 >> + * Note that the function _internal_error does not return. Evaluating
\r
80 >> + * to NOTMUCH_STATUS_SUCCESS is done purely to appease the compiler.
\r
82 >> #define COERCE_STATUS(private_status, format, ...) \
\r
83 >> ((private_status >= (notmuch_private_status_t) NOTMUCH_STATUS_LAST_STATUS)\
\r
85 >> - (notmuch_status_t) _internal_error (format " (%s).\n", \
\r
86 >> - ##__VA_ARGS__, \
\r
87 >> - __location__) \
\r
88 >> + _internal_error (format " (%s).\n", \
\r
89 >> + ##__VA_ARGS__, \
\r
90 >> + __location__), \
\r
91 >> + (notmuch_status_t) NOTMUCH_PRIVATE_STATUS_SUCCESS \
\r
93 > Just a nit: why not simply NOTMUCH_STATUS_SUCCESS?
\r
95 > Otherwise, this series LGTM. No need to roll another version just for
\r
102 >> (notmuch_status_t) private_status)
\r