Public bug reported: Some functions that have warn-unused-result cannot be used in a way described in http://gcc.gnu.org/onlinedocs/gcc-4.4.1/gcc/Warning- Options.html
For example this line (where STDOUT_FILENO==0 and FLAG_EXIT_NOW is defined as some string): (void) write(STDOUT_FILENO, FLAG_EXIT_NOW, sizeof FLAG_EXIT_NOW - 1); compiled with: cc -g -O -W -Wall -Wno-system-headers -Werror -Wunused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wunused- parameter -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -c .... will report "error: ignoring return value of ‘write’, declared with attribute warn_unused_result". According to gcc docs, casting to (void) should prevent that. ProblemType: Bug Architecture: i386 Date: Thu Nov 5 22:31:44 2009 DistroRelease: Ubuntu 9.10 Package: gcc 4:4.4.1-1ubuntu2 ProcEnviron: LANGUAGE=pl_PL.UTF-8 PATH=(custom, no user) LANG=pl_PL.UTF-8 SHELL=/bin/zsh ProcVersionSignature: Ubuntu 2.6.31-14.48-generic SourcePackage: gcc-defaults Uname: Linux 2.6.31-14-generic i686 ** Affects: gcc-defaults (Ubuntu) Importance: Undecided Status: New ** Tags: apport-bug i386 -- -Wunused-value cannot be suppressed https://bugs.launchpad.net/bugs/475934 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs