1 Return-Path: <five9a2@gmail.com>
\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 BFDA7431FBC
\r
6 for <notmuch@notmuchmail.org>; Mon, 23 Nov 2009 06:24:18 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
8 Received: from olra.theworths.org ([127.0.0.1])
\r
9 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
10 with ESMTP id b0YQhekNKv0l for <notmuch@notmuchmail.org>;
\r
11 Mon, 23 Nov 2009 06:24:18 -0800 (PST)
\r
12 Received: from mail-bw0-f210.google.com (mail-bw0-f210.google.com
\r
14 by olra.theworths.org (Postfix) with ESMTP id C0E25431FAE
\r
15 for <notmuch@notmuchmail.org>; Mon, 23 Nov 2009 06:24:17 -0800 (PST)
\r
16 Received: by bwz2 with SMTP id 2so5274215bwz.0
\r
17 for <notmuch@notmuchmail.org>; Mon, 23 Nov 2009 06:24:16 -0800 (PST)
\r
18 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
\r
19 h=domainkey-signature:received:received:sender:from:to:cc:subject
\r
20 :in-reply-to:references:date:message-id:mime-version:content-type;
\r
21 bh=hwDxi7CbZxlHBpyVwsYNPBmR2n4X1ydbCBb2e7bZ6PM=;
\r
22 b=KnoT1DLrgxdUtf2iCIZptkc6UIeKEWrQ36WyoMtjz2MU5ED1xmgt5PJa53hIEHycft
\r
23 3ve3q8E/L60XdoLgqu+x2voSSd9/4uwoWic6XFommRZvxcGaXkNypXncCwWD7RmXG78I
\r
24 zRojaT1wdXW5Rs1igiUm4/hoj9abjc+0YKda8=
\r
25 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
\r
26 h=sender:from:to:cc:subject:in-reply-to:references:date:message-id
\r
27 :mime-version:content-type;
\r
28 b=EUbqDt+QD6C+cNU0bY2X4ftoZtM1twifbX3H7iyLFldXLG6WNeh2dU9cVuZYqrTleq
\r
29 CcZ+Fh026Ag+sA/hrHhB620bj7jUeEaUoD3m/ZYrKSOLM/zCLM35JUWi6qpafh1Gwxht
\r
30 VZZV7ho2ZShrt3knPPs3GRyRElrbK2nvprdPs=
\r
31 Received: by 10.204.2.73 with SMTP id 9mr4687447bki.159.1258986256520;
\r
32 Mon, 23 Nov 2009 06:24:16 -0800 (PST)
\r
33 Received: from kunyang (vawpc43.ethz.ch [129.132.59.11])
\r
34 by mx.google.com with ESMTPS id 31sm5790992fkt.1.2009.11.23.06.24.14
\r
35 (version=TLSv1/SSLv3 cipher=RC4-MD5);
\r
36 Mon, 23 Nov 2009 06:24:15 -0800 (PST)
\r
37 Sender: Jed Brown <five9a2@gmail.com>
\r
38 From: Jed Brown <jed@59A2.org>
\r
39 To: Karl Wiberg <kha@treskal.com>, Dirk-Jan Binnema <djcb.bulk@gmail.com>
\r
40 In-Reply-To: <b8197bcb0911230519l4edf1b72w26d993834f25a417@mail.gmail.com>
\r
41 References: <87skc5yd6v.wl%djcb@djcbsoftware.nl>
\r
42 <b8197bcb0911222334v26e96890t3632369ff32ff80f@mail.gmail.com>
\r
43 <1873022c0911230311o77e55fdqa5464a2dd16ec265@mail.gmail.com>
\r
44 <b8197bcb0911230519l4edf1b72w26d993834f25a417@mail.gmail.com>
\r
45 Date: Mon, 23 Nov 2009 15:24:46 +0100
\r
46 Message-ID: <87ws1h48up.fsf@59A2.org>
\r
48 Content-Type: text/plain; charset=us-ascii
\r
49 Cc: "notmuch@notmuchmail org" <notmuch@notmuchmail.org>, djcb@djcbsoftware.nl
\r
50 Subject: Re: [notmuch] [PATCH 1/2] * avoid gcc 4.4.1 compiler warnings due
\r
51 to ignored write return values
\r
52 X-BeenThere: notmuch@notmuchmail.org
\r
53 X-Mailman-Version: 2.1.12
\r
55 List-Id: "Use and development of the notmuch mail system."
\r
56 <notmuch.notmuchmail.org>
\r
57 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
58 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
59 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
60 List-Post: <mailto:notmuch@notmuchmail.org>
\r
61 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
62 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
63 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
64 X-List-Received-Date: Mon, 23 Nov 2009 14:24:18 -0000
\r
66 On Mon, 23 Nov 2009 14:19:18 +0100, Karl Wiberg <kha@treskal.com> wrote:
\r
67 > On Mon, Nov 23, 2009 at 12:11 PM, Dirk-Jan Binnema <djcb.bulk@gmail.com> wrote:
\r
69 > > On Mon, Nov 23, 2009 at 9:34 AM, Karl Wiberg <kha@treskal.com> wrote:
\r
71 > > > Didn't the "(void)" suggestion work?
\r
73 > > I actually preferred that solution, but unfortunately, it didn't
\r
74 > > stop gcc from complaining...
\r
76 > Hmpf. I'd argue that that's a gcc bug, forcing the user to use an
\r
77 > unnecessarily complicated way to pretend to use the return value. Oh
\r
80 >From the gcc man page:
\r
83 Warn whenever a statement computes a result that is explicitly
\r
84 not used. To suppress this warning cast the unused expression
\r
85 to void. This includes an expression-statement or the left-
\r
86 hand side of a comma expression that contains no side effects.
\r
87 For example, an expression such as x[i,j] will cause a
\r
88 warning, while x[(void)i,j] will not.
\r
90 This warning is enabled by -Wall.
\r
93 But I'm confused here because I don't currently see any warnings with
\r
94 gcc-4.4.2. Actually this must be a bug because I get no warnings for
\r
95 the blatantly unused
\r
99 with -Wall -Wextra -pedantic. Anyway, if your system headers specify
\r
100 __attribute__((warn_unused_result)) for write, then you could be running
\r
101 into this bug/feature
\r
103 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35579
\r