Re: [PATCH] emacs: wash: make word-wrap bound message width
[notmuch-archives.git] / 71 / b1a6ed335a57424b882ee0e1e1f94a30c6eead
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 DC6D2431FD0\r
6         for <notmuch@notmuchmail.org>; Thu, 22 Dec 2011 11:02:07 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -0.7\r
10 X-Spam-Level: \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 b9SAn5KmYL7i for <notmuch@notmuchmail.org>;\r
16         Thu, 22 Dec 2011 11:02:06 -0800 (PST)\r
17 Received: from dmz-mailsec-scanner-4.mit.edu (DMZ-MAILSEC-SCANNER-4.MIT.EDU\r
18         [18.9.25.15])\r
19         by olra.theworths.org (Postfix) with ESMTP id D9024431FB6\r
20         for <notmuch@notmuchmail.org>; Thu, 22 Dec 2011 11:02:05 -0800 (PST)\r
21 X-AuditID: 1209190f-b7f8a6d000000914-77-4ef37eabe63b\r
22 Received: from mailhub-auth-4.mit.edu ( [18.7.62.39])\r
23         by dmz-mailsec-scanner-4.mit.edu (Symantec Messaging Gateway) with SMTP\r
24         id 66.59.02324.BAE73FE4; Thu, 22 Dec 2011 14:02:03 -0500 (EST)\r
25 Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])\r
26         by mailhub-auth-4.mit.edu (8.13.8/8.9.2) with ESMTP id pBMJ22Ef019051; \r
27         Thu, 22 Dec 2011 14:02:03 -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 pBMJ21NA019341\r
32         (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);\r
33         Thu, 22 Dec 2011 14:02:02 -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 1Rdnuz-00006O-9N; Thu, 22 Dec 2011 14:03:05 -0500\r
37 Date: Thu, 22 Dec 2011 14:03:05 -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
41         function return.\r
42 Message-ID: <20111222190305.GA324@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 MIME-Version: 1.0\r
47 Content-Type: text/plain; charset=us-ascii\r
48 Content-Disposition: inline\r
49 In-Reply-To: <cunfwgdvzpy.fsf@hotblack-desiato.hh.sledj.net>\r
50 User-Agent: Mutt/1.5.21 (2010-09-15)\r
51 X-Brightmail-Tracker:\r
52  H4sIAAAAAAAAA+NgFmphleLIzCtJLcpLzFFi42IRYrdT111d99nP4NgKMYt9d7YwWVy/OZPZ\r
53         gclj1/O/TB7PVt1iDmCK4rJJSc3JLEst0rdL4Mp4/rmFveAfV0Vr2wbGBsZvHF2MnBwSAiYS\r
54         R/qfMEPYYhIX7q1n62Lk4hAS2Mco8WDWbShnA6PEgU9HoJyTTBKLH/UwQzhLGCV+LN/N1MXI\r
55         wcEioCqx+G8EyCg2AQ2JbfuXM4LYIgKKEv+/rWAHsZkFpCW+/W5mArGFBaIlrv44zgJi8wpo\r
56         Sdx4uIgRYmY/o0THwzVsEAlBiZMzn7BANAMV/XsJtgtk0PJ/YC9wCthIvD58khXEFhVQkZhy\r
57         chvbBEahWUi6ZyHpnoXQvYCReRWjbEpulW5uYmZOcWqybnFyYl5eapGuiV5uZoleakrpJkZQ\r
58         YHNK8u9g/HZQ6RCjAAejEg9vZdFnPyHWxLLiytxDjJIcTEqivE+rgUJ8SfkplRmJxRnxRaU5\r
59         qcWHGCU4mJVEeCsYgXK8KYmVValF+TApaQ4WJXFeNa13fkIC6YklqdmpqQWpRTBZGQ4OJQne\r
60         q7VAjYJFqempFWmZOSUIaSYOTpDhPEDDj4HU8BYXJOYWZ6ZD5E8xKkqJ864ASQiAJDJK8+B6\r
61         YYnnFaM40CvCvFtBqniASQuu+xXQYCagwducP4AMLklESEk1MJppGntcPxUwKzqxetESlp1p\r
62         272m2Hg4ZAm/tEk5kZpuFGakamgTZHPEvOu2xjKpH34MM/f8/rKf5XjzZB6fps1TN/lw2nYu\r
63         6VOIUgyewHlr29t/15hP7jHb/W2/Zvbnz7HH/+1ewJS10rcqzt2gOJS78RbnhGv2SRyWFcpt\r
64         snpHr/HLldp+UGIpzkg01GIuKk4EAMK2GysXAwAA\r
65 Cc: notmuch@notmuchmail.org\r
66 X-BeenThere: notmuch@notmuchmail.org\r
67 X-Mailman-Version: 2.1.13\r
68 Precedence: list\r
69 List-Id: "Use and development of the notmuch mail system."\r
70         <notmuch.notmuchmail.org>\r
71 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
72         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
73 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
74 List-Post: <mailto:notmuch@notmuchmail.org>\r
75 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
76 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
77         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
78 X-List-Received-Date: Thu, 22 Dec 2011 19:02:08 -0000\r
79 \r
80 Quoth David Edmondson on Dec 22 at  7:21 am:\r
81 > On Thu, 22 Dec 2011 02:03:45 -0500, Austin Clements <amdragon@MIT.EDU> wrote:\r
82 > > I must admit I haven't been following the warnings problem very\r
83 > > closely, but perhaps we shouldn't be ignoring these return codes?\r
84\r
85 > In general I agree, but what would we do if writing an error message to\r
86 > stderr fails?\r
87 \r
88 This was discussed on IRC, but calls to write(2) should never be bare.\r
89 I believe it's marked warn_unused_result not because libc is so\r
90 concerned with people checking for error returns (otherwise all sorts\r
91 of things would be marked warn_unused_result) but because even a\r
92 successful write can be a short write.  Hence, not checking the result\r
93 is a bug, even if you don't care about errors.\r
94 \r
95 fwrite's a little trickier, since it will only short-write on an\r
96 error, so to me it seems perfectly legitimate to ignore the result if\r
97 you don't care about errors.\r
98 \r
99 I don't seem to have whatever glibc version the buildbot does that\r
100 marks these warn_unused_result, but I can reproduce it by adding\r
101 \r
102 __attribute__((warn_unused_result))\r
103 ssize_t write(int fd, const void *buf, size_t count);\r
104 __attribute__((warn_unused_result))\r
105 size_t fwrite(const void *ptr, size_t size, size_t nmemb, FILE *stream);\r
106 \r
107 to notmuch-client.h.  Testing with these, if I add any form of result\r
108 checking, even if it does nothing in most cases, GCC is quiet.\r