From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: attribute warn_unused_result Date: Thu, 03 Feb 2011 23:14:27 +0200 Message-ID: <83r5bobz2k.fsf@gnu.org> References: Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1296779937 21281 80.91.229.12 (4 Feb 2011 00:38:57 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 4 Feb 2011 00:38:57 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Feb 04 01:38:52 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Pl9hL-00025h-Rm for ged-emacs-devel@m.gmane.org; Fri, 04 Feb 2011 01:38:52 +0100 Original-Received: from localhost ([127.0.0.1]:45461 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pl9hK-0006g0-FC for ged-emacs-devel@m.gmane.org; Thu, 03 Feb 2011 19:38:50 -0500 Original-Received: from [140.186.70.92] (port=38145 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pl6aR-0000bN-G4 for emacs-devel@gnu.org; Thu, 03 Feb 2011 16:19:34 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pl6W0-0007S2-Q5 for emacs-devel@gnu.org; Thu, 03 Feb 2011 16:14:57 -0500 Original-Received: from mtaout21.012.net.il ([80.179.55.169]:49754) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pl6W0-0007RR-Ih for emacs-devel@gnu.org; Thu, 03 Feb 2011 16:14:56 -0500 Original-Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0LG200C0086ALE00@a-mtaout21.012.net.il> for emacs-devel@gnu.org; Thu, 03 Feb 2011 23:14:22 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([77.124.97.124]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LG200CCP8BWASC0@a-mtaout21.012.net.il>; Thu, 03 Feb 2011 23:14:22 +0200 (IST) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-Received-From: 80.179.55.169 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:135547 Archived-At: > From: Stefan Monnier > Cc: emacs-devel@gnu.org > Date: Thu, 03 Feb 2011 13:53:25 -0500 > > > Do we care about these warnings? There's significant controversy > > about them (e.g., the warnings about `write' are when we write an > > error message to stderr, in which case there's nothing useful one can > > do with the return value), so I'm not sure we should care. > > I think the right thing to do is to adjust the code so as to make it > clear to the compiler that we thought about the issue and decided that > we really do want to ignore the return value. You can't do that, not with this warning. > So, for each such case, we should think about it and if we indeed want > to ignore the return value, we should put an explicit cast to that > effect (which should hopefully be understood by gcc to silence the > warning). It isn't.