From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: attribute warn_unused_result Date: Thu, 03 Feb 2011 13:53:25 -0500 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1296759271 4243 80.91.229.12 (3 Feb 2011 18:54:31 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 3 Feb 2011 18:54:31 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Feb 03 19:54:27 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 1Pl4K2-0005J6-KL for ged-emacs-devel@m.gmane.org; Thu, 03 Feb 2011 19:54:26 +0100 Original-Received: from localhost ([127.0.0.1]:43341 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pl4Jw-0001Dx-NZ for ged-emacs-devel@m.gmane.org; Thu, 03 Feb 2011 13:54:20 -0500 Original-Received: from [140.186.70.92] (port=52694 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pl4J7-0000dR-By for emacs-devel@gnu.org; Thu, 03 Feb 2011 13:53:31 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pl4J6-0004VS-7z for emacs-devel@gnu.org; Thu, 03 Feb 2011 13:53:29 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:29117 helo=ironport2-out.pppoe.ca) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pl4J4-0004Ut-Tu; Thu, 03 Feb 2011 13:53:26 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvsEAJeISk1FxIUe/2dsb2JhbAClMHS9fIVYBIR5jDCCbQ X-IronPort-AV: E=Sophos;i="4.60,421,1291611600"; d="scan'208";a="90489762" Original-Received: from 69-196-133-30.dsl.teksavvy.com (HELO pastel.home) ([69.196.133.30]) by ironport2-out.pppoe.ca with ESMTP/TLS/ADH-AES256-SHA; 03 Feb 2011 13:53:25 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 65B8158F44; Thu, 3 Feb 2011 13:53:25 -0500 (EST) In-Reply-To: (Eli Zaretskii's message of "Thu, 03 Feb 2011 09:57:55 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.181 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:135512 Archived-At: > 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. 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). Stefan