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: attribute warn_unused_result Date: Thu, 03 Feb 2011 09:57:55 -0500 Message-ID: Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1296745298 17733 80.91.229.12 (3 Feb 2011 15:01:38 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 3 Feb 2011 15:01:38 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Feb 03 16:01:28 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 1Pl0gX-0003WU-K6 for ged-emacs-devel@m.gmane.org; Thu, 03 Feb 2011 16:01:25 +0100 Original-Received: from localhost ([127.0.0.1]:51400 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pl0gW-0000My-ME for ged-emacs-devel@m.gmane.org; Thu, 03 Feb 2011 10:01:24 -0500 Original-Received: from [140.186.70.92] (port=58421 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pl0dA-00070z-N6 for emacs-devel@gnu.org; Thu, 03 Feb 2011 09:57:57 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pl0d9-0001HH-Fs for emacs-devel@gnu.org; Thu, 03 Feb 2011 09:57:56 -0500 Original-Received: from fencepost.gnu.org ([140.186.70.10]:53805) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pl0d9-0001HB-DK for emacs-devel@gnu.org; Thu, 03 Feb 2011 09:57:55 -0500 Original-Received: from eliz by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1Pl0d9-0003zX-2q for emacs-devel@gnu.org; Thu, 03 Feb 2011 09:57:55 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.10 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:135504 Archived-At: fencepost.gnu.org was upgraded to GCC 4.4.3-4ubuntu5 and glibc 2.11, and that combination causes GCC to emit several warnings like these while compiling Emacs: sysdep.c: In function 'sys_subshell': sysdep.c:550: warning: ignoring return value of 'chdir', declared with attribute warn_unused_result sysdep.c:581: warning: ignoring return value of 'write', declared with attribute warn_unused_result fileio.c: In function 'Fcopy_file': fileio.c:1968: warning: ignoring return value of 'fchown', declared with attribute warn_unused_result 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. If we do care about this, we should fix the code; if not, we should either add "-Wno-unused-result" to the compilation switches, or use `#pragma GCC diagnostic ignored "-Wunused-result"' in the affected source files.