http://bugs.winehq.org/show_bug.cgi?id=16413
Summary: Ignored return values Product: Wine Version: 1.1.10 Platform: PC OS/Version: Linux Status: NEW Keywords: download, source Severity: enhancement Priority: P2 Component: build-env AssignedTo: wine-bugs@winehq.org ReportedBy: austinenglish@gmail.com
Created an attachment (id=17744) --> (http://bugs.winehq.org/attachment.cgi?id=17744) make log
austin@austin-desktop:~/wine-git$ gcc 4.3.2, CFLAGS="-O1 -g" ./configure && make clean && make &> foo.txt
austin@austin-desktop:~/wine-git$ grep 'unused' foo.txt | wc -l 137
Lots of: make[1]: Entering directory `/home/austin/wine-git/tools' ccache gcc -c -I. -I. -I../include -I../include -I/usr/include/freetype2 -Wall -pipe -fno-strict-aliasing -Wdeclaration-after-statement -Wwrite-strings -Wtype-limits -Wpointer-arith -O1 -g -o makedep.o makedep.c makedep.c: In function ‘get_line’: makedep.c:199: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result makedep.c:211: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result makedep.c: In function ‘output_dependencies’: makedep.c:883: warning: ignoring return value of ‘ftruncate’, declared with attribute warn_unused_result ccache gcc -O1 -g -o makedep makedep.o make[1]: Leaving directory `/home/austin/wine-git/tools'
foo.txt attached
http://bugs.winehq.org/show_bug.cgi?id=16413
Dmitry Timoshkov dmitry@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |adys.wh+winehqdotorg@gmail.c | |om
--- Comment #1 from Dmitry Timoshkov dmitry@codeweavers.com 2008-12-19 06:54:05 --- *** Bug 16568 has been marked as a duplicate of this bug. ***
http://bugs.winehq.org/show_bug.cgi?id=16413
Detlef Riekenberg wine.dev@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |wine.dev@web.de
http://bugs.winehq.org/show_bug.cgi?id=16413
--- Comment #2 from Austin English austinenglish@gmail.com 2009-01-04 15:06:02 --- Titon Barua has sent several patches for this: http://www.winehq.org/pipermail/wine-patches/2009-January/067071.html http://www.winehq.org/pipermail/wine-patches/2009-January/067072.html http://www.winehq.org/pipermail/wine-patches/2009-January/067073.html http://www.winehq.org/pipermail/wine-patches/2009-January/067074.html
http://bugs.winehq.org/show_bug.cgi?id=16413
--- Comment #3 from Austin English austinenglish@gmail.com 2009-01-10 18:46:14 --- Anyone interested in fixing this should see the comments Titon's patches got: http://www.winehq.org/pipermail/wine-devel/2009-January/071781.html http://www.winehq.org/pipermail/wine-devel/2009-January/071769.html http://www.winehq.org/pipermail/wine-devel/2009-January/071783.html
Dan put it best: "As Alexandre implied in http://www.winehq.org/pipermail/wine-devel/2009-January/071769.html one should not fix these warnings casually. A real fix probably involves actually handing the error rather than printing a warning."
http://bugs.winehq.org/show_bug.cgi?id=16413
--- Comment #4 from Alexandre Julliard julliard@winehq.org 2009-01-12 06:24:43 --- I'd also suggest to file a bug with your distro. For most functions these warnings have way too many false positives to be enabled by default, especially since there's no easy way to turn the warning off.
http://bugs.winehq.org/show_bug.cgi?id=16413
--- Comment #5 from Austin English austinenglish@gmail.com 2009-01-12 09:23:23 --- (In reply to comment #4)
I'd also suggest to file a bug with your distro. For most functions these warnings have way too many false positives to be enabled by default, especially since there's no easy way to turn the warning off.
Ubuntu Intrepid doesn't show this anymore, but I still see this on pretty much every other platform I compile on. Those aren't as often, so I've disabled -Werror for now on those.
It'd be nice to fix this properly though.
http://bugs.winehq.org/show_bug.cgi?id=16413
--- Comment #6 from Alexandre Julliard julliard@winehq.org 2009-01-12 09:30:12 --- The right fix is in glibc, since the gcc guys have decided that it can't be fixed by simply adding a void cast. Glibc should make sure that the warning is only enabled on functions where the return value really needs to always be checked. That's certainly not the case for things like fwrite().
http://bugs.winehq.org/show_bug.cgi?id=16413
--- Comment #7 from Austin English austinenglish@gmail.com 2009-01-12 09:32:30 --- (In reply to comment #6)
The right fix is in glibc, since the gcc guys have decided that it can't be fixed by simply adding a void cast. Glibc should make sure that the warning is only enabled on functions where the return value really needs to always be checked. That's certainly not the case for things like fwrite().
Good to know, thanks. I'll check the glibc version on affected/unaffected boxes.
http://bugs.winehq.org/show_bug.cgi?id=16413
Rafał Mużyło galtgendo@o2.pl changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |galtgendo@o2.pl
--- Comment #8 from Rafał Mużyło galtgendo@o2.pl 2009-02-16 17:06:04 --- It's good, this bug exist, cause I would have trouble putting it all together.
Recently, my distro enabled by default the option that generates those warnings (in the compiler).
It's -D_FORTIFY_SOURCE=2. So, glibc is the source of those warnings only in part and disabling them should not be hard. AFAIK, RedHat derivates enabled that option for quite longer (in compliler, too).
http://bugs.winehq.org/show_bug.cgi?id=16413
--- Comment #9 from Dmitry Timoshkov dmitry@codeweavers.com 2009-02-16 23:39:03 --- (In reply to comment #8)
It's good, this bug exist, cause I would have trouble putting it all together. Recently, my distro enabled by default the option that generates those warnings (in the compiler). It's -D_FORTIFY_SOURCE=2. So, glibc is the source of those warnings only in part and disabling them should not be hard. AFAIK, RedHat derivates enabled that option for quite longer (in compliler, too).
As pointed out in the comment #4 report the bug to your distro. It's not up to a distribution to force warnings for the source, it's the developer's decision, not anybody else.
http://bugs.winehq.org/show_bug.cgi?id=16413
--- Comment #10 from Rafał Mużyło galtgendo@o2.pl 2009-02-17 13:44:54 --- In Gentoo, it is the distro job, in a way. Besides, you seem to miss the point, what I wrote meant: there is no bug.
And if you complain about warnings, why do you bother with -Werror anyway ?
http://bugs.winehq.org/show_bug.cgi?id=16413
--- Comment #11 from Dmitry Timoshkov dmitry@codeweavers.com 2009-02-17 21:49:31 --- (In reply to comment #10)
In Gentoo, it is the distro job, in a way. Besides, you seem to miss the point, what I wrote meant: there is no bug.
Exactly, this bug is a fake.
And if you complain about warnings, why do you bother with -Werror anyway ?
This argument seems to be taken out of the air.
http://bugs.winehq.org/show_bug.cgi?id=16413
--- Comment #12 from Austin English austinenglish@gmail.com 2010-08-05 18:57:56 --- Still present, though not as big of a deal after http://source.winehq.org/git/wine.git/?a=commitdiff;h=83676d721fc6a981f025ed....
http://bugs.winehq.org/show_bug.cgi?id=16413
--- Comment #13 from Jerome Leclanche adys.wh@gmail.com 2010-08-05 19:06:44 --- Can be closed, then, IMHO.
http://bugs.winehq.org/show_bug.cgi?id=16413
--- Comment #14 from Rafał Mużyło galtgendo@o2.pl 2010-08-05 20:06:40 --- The only result of that commit I could see, was: At top level: cc1: warning: unrecognized command line option "-Wno-unused-result"
unless I'm missing something, gcc 4.4 doesn't have such option.
http://bugs.winehq.org/show_bug.cgi?id=16413
Dmitry Timoshkov dmitry@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED
--- Comment #15 from Dmitry Timoshkov dmitry@codeweavers.com 2010-08-06 00:38:45 --- Fixed (If not WONTFIX).
http://bugs.winehq.org/show_bug.cgi?id=16413
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #16 from Alexandre Julliard julliard@winehq.org 2010-08-20 12:38:38 --- Closing bugs fixed in 1.3.1.