Fail to compile on glibc 2.8 and CFLAGS -D_FORTIFY_SOURCE=2 cc1: warnings being treated as errors extract_ac3.c: In function 'read_write_next_bytes': extract_ac3.c:163: warning: ignoring return value of 'write', declared with attribute warn_unused_result extract_ac3.c:174: warning: ignoring return value of 'write', declared with attribute warn_unused_result make[2]: *** [extract_ac3.o] Error 1 make[2]: Leaving directory `/var/tmp/portage/media-sound/alsa-tools-1.0.17/work/alsa-tools-1.0.17/ac3dec/tools' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/var/tmp/portage/media-sound/alsa-tools-1.0.17/work/alsa-tools-1.0.17/ac3dec' make: *** [all] Error 2 Reproducible: Always Steps to Reproduce: 1.use the hardened gcc 4 toolchain-overlay or -D_FORTIFY_SOURCES=2 in CFLAGS and glibc 2.8 2. emerge alsa-tools 1.0.17 3. Actual Results: cc1: warnings being treated as errors extract_ac3.c: In function 'read_write_next_bytes': extract_ac3.c:163: warning: ignoring return value of 'write', declared with attribute warn_unused_result Expected Results: make[2]: Leaving directory `/var/tmp/portage/media-sound/alsa-tools-1.0.17/work/alsa-tools-1.0.17/ld10k1' make[1]: Leaving directory `/var/tmp/portage/media-sound/alsa-tools-1.0.17/work/alsa-tools-1.0.17/ld10k1' >>> Source compiled. Portage 2.1.4.4 (hardened/linux/amd64/2008.0, gcc-4.3.2, glibc-2.8_p20080602-r0, 2.6.25-gentoo-r7 x86_64) ================================================================= System uname: 2.6.25-gentoo-r7 x86_64 Intel(R) Core(TM)2 Duo CPU T7700 @ 2.40GHz Timestamp of tree: Thu, 11 Sep 2008 18:45:01 +0000 ccache version 2.4 [enabled] app-shells/bash: 3.2_p33 dev-lang/python: 2.4.4-r13, 2.5.2-r6 dev-python/pycrypto: 2.0.1-r6 dev-util/ccache: 2.4-r7 sys-apps/baselayout: 1.12.11.1 sys-apps/sandbox: 1.2.18.1-r2 sys-devel/autoconf: 2.61-r2 sys-devel/automake: 1.7.9-r1, 1.9.6-r2, 1.10.1 sys-devel/binutils: 2.18-r4 sys-devel/gcc-config: 1.4.0-r4 sys-devel/libtool: 1.5.26 virtual/os-headers: 2.6.23-r3 ABI="amd64" ACCEPT_KEYWORDS="amd64"
Created attachment 165765 [details, diff] fix warn_unused_result in extract_ac3.c
Thanks for the patch. I think you need to update this line: if(write(outfd, cur_pos, size) != count) copy-paste-modify error... 'count' was from previous changed section
Magnus, could you provide a link to the upstream ALSA bug report?
Created attachment 165860 [details, diff] fix the typo fix the count -> size thing
(In reply to comment #3) > Magnus, could you provide a link to the upstream ALSA bug report? > Will fix that later to day.
https://bugtrack.alsa-project.org/alsa-bug/view.php?id=4276
Updated the URL
alsa-tools-1.0.19 Compiles fine.
Can some one confirmed this so i can close it?
The -Werror is gone on 1.0.19
*** Bug 263360 has been marked as a duplicate of this bug. ***