1 Return-Path: <amdragon@mit.edu>
\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 1D6AB431FD0
\r
6 for <notmuch@notmuchmail.org>; Thu, 22 Dec 2011 12:14:52 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5
\r
12 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled
\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 CCiWpi9J6w23 for <notmuch@notmuchmail.org>;
\r
16 Thu, 22 Dec 2011 12:14:51 -0800 (PST)
\r
17 Received: from dmz-mailsec-scanner-4.mit.edu (DMZ-MAILSEC-SCANNER-4.MIT.EDU
\r
19 by olra.theworths.org (Postfix) with ESMTP id 64C95431FB6
\r
20 for <notmuch@notmuchmail.org>; Thu, 22 Dec 2011 12:14:51 -0800 (PST)
\r
21 X-AuditID: 1209190f-b7f8a6d000000914-54-4ef38fbaff34
\r
22 Received: from mailhub-auth-1.mit.edu ( [18.9.21.35])
\r
23 by dmz-mailsec-scanner-4.mit.edu (Symantec Messaging Gateway) with SMTP
\r
24 id EC.7D.02324.ABF83FE4; Thu, 22 Dec 2011 15:14:50 -0500 (EST)
\r
25 Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])
\r
26 by mailhub-auth-1.mit.edu (8.13.8/8.9.2) with ESMTP id pBMKEnq1013291;
\r
27 Thu, 22 Dec 2011 15:14:50 -0500
\r
28 Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91])
\r
29 (authenticated bits=0)
\r
30 (User authenticated as amdragon@ATHENA.MIT.EDU)
\r
31 by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id pBMKEmqd005829
\r
32 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);
\r
33 Thu, 22 Dec 2011 15:14:49 -0500 (EST)
\r
34 Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.77)
\r
35 (envelope-from <amdragon@mit.edu>)
\r
36 id 1Rdp3R-0000Ch-4Q; Thu, 22 Dec 2011 15:15:53 -0500
\r
37 Date: Thu, 22 Dec 2011 15:15:53 -0500
\r
38 From: Austin Clements <amdragon@MIT.EDU>
\r
39 To: David Edmondson <dme@dme.org>
\r
40 Subject: Re: [RFC][PATCH] notmuch: Workaround to allow ignoring non-void
\r
42 Message-ID: <20111222201553.GK10376@mit.edu>
\r
43 References: <1324503532-5799-1-git-send-email-dme@dme.org>
\r
44 <20111222070345.GI10376@mit.edu>
\r
45 <cunfwgdvzpy.fsf@hotblack-desiato.hh.sledj.net>
\r
46 <20111222190305.GA324@mit.edu>
\r
47 <cuny5u4v260.fsf@hotblack-desiato.hh.sledj.net>
\r
49 Content-Type: text/plain; charset=us-ascii
\r
50 Content-Disposition: inline
\r
51 In-Reply-To: <cuny5u4v260.fsf@hotblack-desiato.hh.sledj.net>
\r
52 User-Agent: Mutt/1.5.21 (2010-09-15)
\r
53 X-Brightmail-Tracker:
\r
54 H4sIAAAAAAAAA+NgFmplleLIzCtJLcpLzFFi42IR4hRV1t3V/9nP4PZGHYt9d7YwWVy/OZPZ
\r
55 gclj1/O/TB7PVt1iDmCK4rJJSc3JLEst0rdL4MqYfOQbW8Fp7oorHe9ZGhjfc3QxcnJICJhI
\r
56 TLx5hw3CFpO4cG89kM3FISSwj1Fi9amrjBDOBkaJye+eQ2VOMkl8e/oDylnCKLHt3VVWkH4W
\r
57 AVWJ98t/gc1iE9CQ2LZ/OSOILSKgKPH/2wp2EJtZQFri2+9mJhBbWCBa4uqP4ywgNq+AjsSr
\r
58 5+9YIYY+YpSYOHkBE0RCUOLkzCcsEM1aEjf+vQSKc4ANWv4P7AdOARuJqW1HwOaLCqhITDm5
\r
59 jW0Co9AsJN2zkHTPQuhewMi8ilE2JbdKNzcxM6c4NVm3ODkxLy+1SNdELzezRC81pXQTIzi0
\r
60 Jfl3MH47qHSIUYCDUYmHt7Los58Qa2JZcWXuIUZJDiYlUV6dPqAQX1J+SmVGYnFGfFFpTmrx
\r
61 IUYJDmYlEd4KRqAcb0piZVVqUT5MSpqDRUmcV03rnZ+QQHpiSWp2ampBahFMVoaDQ0mCNxUY
\r
62 w0KCRanpqRVpmTklCGkmDk6Q4TxAwyNAaniLCxJzizPTIfKnGBWlxHndQBICIImM0jy4Xljq
\r
63 ecUoDvSKMK8ySBUPMG3Bdb8CGswENHib8weQwSWJCCmpBsYpPpWqB+LCL39KPvXw/w59Sz4F
\r
64 fw7NQxNn9k1+Kj034vd+F+bFqZEb9e2e/g+1VjoaufcFt39uuqZ+iNjz+REimT3Hana6fu5w
\r
65 mnPO4H/A9xcM0x1NP38+F9LyujQ45l520vo9VYcPfN1Z+aRKI5v971pWi+UfO5ybjxxvcjSN
\r
66 CvPS4+ns/6rEUpyRaKjFXFScCABu8T57GAMAAA==
\r
67 Cc: notmuch@notmuchmail.org
\r
68 X-BeenThere: notmuch@notmuchmail.org
\r
69 X-Mailman-Version: 2.1.13
\r
71 List-Id: "Use and development of the notmuch mail system."
\r
72 <notmuch.notmuchmail.org>
\r
73 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
74 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
75 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
76 List-Post: <mailto:notmuch@notmuchmail.org>
\r
77 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
78 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
79 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
80 X-List-Received-Date: Thu, 22 Dec 2011 20:14:52 -0000
\r
82 Quoth David Edmondson on Dec 22 at 7:25 pm:
\r
83 > On Thu, 22 Dec 2011 14:03:05 -0500, Austin Clements <amdragon@MIT.EDU> wrote:
\r
84 > > > In general I agree, but what would we do if writing an error message to
\r
87 > > This was discussed on IRC, but calls to write(2) should never be bare.
\r
88 > > I believe it's marked warn_unused_result not because libc is so
\r
89 > > concerned with people checking for error returns (otherwise all sorts
\r
90 > > of things would be marked warn_unused_result) but because even a
\r
91 > > successful write can be a short write. Hence, not checking the result
\r
92 > > is a bug, even if you don't care about errors.
\r
94 > As I said, the principle is sound. What would do in this specific case?
\r
97 > handle_sigint (unused (int sig))
\r
99 > static char msg[] = "Stopping... \n";
\r
101 > write(2, msg, sizeof(msg)-1);
\r
107 > if (write(2, msg, sizeof(msg)-1) {
\r
108 > /* Appease the compiler. */;
\r
111 Maybe I missed something, but what's wrong with using a standard write
\r
112 loop (like j4ni suggested on IRC)? In my mind this isn't about
\r
113 appeasing the compiler; the compiler is pointing out a real bug.
\r
114 Patch coming in a moment...
\r
116 I'm not sure what to do about the specific case of fwrite, though
\r
118 http://sourceware.org/bugzilla/show_bug.cgi?id=11959
\r
119 I'm not the only person who thinks that fwrite being
\r
120 warn_unused_result is odd.
\r