[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
attribute warn_unused_result
From: |
Eli Zaretskii |
Subject: |
attribute warn_unused_result |
Date: |
Thu, 03 Feb 2011 09:57:55 -0500 |
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.
- attribute warn_unused_result,
Eli Zaretskii <=
- Re: attribute warn_unused_result, Stefan Monnier, 2011/02/03
- Re: attribute warn_unused_result, Paul Eggert, 2011/02/03
- Re: attribute warn_unused_result, Chad Brown, 2011/02/03
- Re: attribute warn_unused_result, Eli Zaretskii, 2011/02/03
- Re: attribute warn_unused_result, Paul Eggert, 2011/02/03
- Re: attribute warn_unused_result, Lennart Borgman, 2011/02/03
- Re: attribute warn_unused_result, Eli Zaretskii, 2011/02/04
- Re: attribute warn_unused_result, Chong Yidong, 2011/02/05
- Re: attribute warn_unused_result, Paul Eggert, 2011/02/03
- Re: attribute warn_unused_result, Eli Zaretskii, 2011/02/04