unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* attribute warn_unused_result
@ 2011-02-03 14:57 Eli Zaretskii
  2011-02-03 18:53 ` Stefan Monnier
  0 siblings, 1 reply; 41+ messages in thread
From: Eli Zaretskii @ 2011-02-03 14:57 UTC (permalink / raw)
  To: emacs-devel

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.



^ permalink raw reply	[flat|nested] 41+ messages in thread

end of thread, other threads:[~2011-02-06 21:26 UTC | newest]

Thread overview: 41+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-03 14:57 attribute warn_unused_result Eli Zaretskii
2011-02-03 18:53 ` Stefan Monnier
2011-02-03 19:33   ` Paul Eggert
2011-02-03 20:42     ` Chad Brown
2011-02-03 21:30       ` Eli Zaretskii
2011-02-03 21:58         ` Paul Eggert
2011-02-04  0:17           ` Lennart Borgman
2011-02-04  8:18           ` Eli Zaretskii
2011-02-05 16:30             ` Chong Yidong
2011-02-03 21:40       ` Paul Eggert
2011-02-04  8:41         ` Eli Zaretskii
2011-02-04  8:51           ` Paul Eggert
2011-02-04 21:05         ` Stefan Monnier
2011-02-05  8:50           ` Eli Zaretskii
2011-02-03 21:47       ` Lennart Borgman
2011-02-04 21:08         ` Stefan Monnier
2011-02-04 21:15           ` Lennart Borgman
2011-02-05  9:03             ` Eli Zaretskii
2011-02-05  8:59           ` Eli Zaretskii
2011-02-03 22:08       ` Andy Moreton
2011-02-03 23:00         ` Paul Eggert
2011-02-03 21:16     ` Eli Zaretskii
2011-02-03 21:14   ` Eli Zaretskii
2011-02-04  0:57     ` Paul Eggert
2011-02-04  8:29       ` Eli Zaretskii
2011-02-04 15:50         ` Tom Tromey
2011-02-04 16:38           ` Eli Zaretskii
2011-02-04 17:12             ` Tom Tromey
2011-02-05  0:11             ` Paul Eggert
2011-02-05  9:18               ` Eli Zaretskii
     [not found]               ` <yyxvd0yxwv1.fsf@fencepost.gnu.org>
2011-02-06  1:34                 ` Paul Eggert
2011-02-06  4:07                   ` Eli Zaretskii
2011-02-06  7:04                     ` Paul Eggert
2011-02-06 10:21                       ` Eli Zaretskii
2011-02-06 18:58                         ` Paul Eggert
2011-02-06 19:27                           ` Eli Zaretskii
2011-02-06 20:11                             ` Paul Eggert
2011-02-06 21:26                               ` Eli Zaretskii
2011-02-04 21:14         ` Stefan Monnier
2011-02-05  8:57           ` Eli Zaretskii
2011-02-05 16:01             ` Stefan Monnier

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).