Hello,
I'm trying to compile wine with --enable-maintainer-mode and I get lots of errors like `ignoring return value of ‘xxx’, declared with attribute warn_unused_result'. I would like to submit a few patches to fix them.
I noticed there's a page on the wiki for this: http://wiki.winehq.org/IgnoredReturnValues
On the other hand, there are no indications on the policy of handling them. Sometimes we just don't care about the return value, but I haven't found a way to tell this to the compiler other than actually using the return value. In other cases, errors might be relevant.
For example, for the code:
if (newdir) chdir(newdir);
would the following be an acceptable fix?
if (newdir) if (chdir(newdir) == -1) /* ignore error */ ;
Should I use WARNs to print the error, in cases where it might be relevant?
Thanks, Octavian
Octavian Voicu octavian.voicu@gmail.com writes:
Hello,
I'm trying to compile wine with --enable-maintainer-mode and I get lots of errors like `ignoring return value of ‘xxx’, declared with attribute warn_unused_result'. I would like to submit a few patches to fix them.
Please don't. The warnings are spurious. Just disable fortify, or don't use maintainer mode (you don't need it).
Alexandre Julliard wrote:
Octavian Voicu octavian.voicu@gmail.com writes:
Hello,
I'm trying to compile wine with --enable-maintainer-mode and I get lots of errors like `ignoring return value of ‘xxx’, declared with attribute warn_unused_result'. I would like to submit a few patches to fix them.
Please don't. The warnings are spurious. Just disable fortify, or don't use maintainer mode (you don't need it).
Should --enable-maintainer-mode be purged then, or should some additional flag magic be added? I ran into this a long time ago as well and made the assumption that it had bitrotted.
~Nate
On Mon, Mar 22, 2010 at 3:21 PM, Nate Gallaher ngallaher@deepthought.org wrote:
Should --enable-maintainer-mode be purged then, or should some additional flag magic be added? I ran into this a long time ago as well and made the assumption that it had bitrotted.
Actually, in my case the problem is with Ubuntu -- the compiler is configured to activate -D_FORTIFY_SOURCE=2 by default. I tried with:
CFLAGS="-D_FORTIFY_SOURCE=0" ../wine-git/configure --enable-maintainer-mode
and I don't get the spurious warnings any more.
The reason I want maintainer mode is that I want to work a bit on the Wine64 issues. Most of them show up as warnings as I understand.
Octavian
On Mon, Mar 22, 2010 at 03:28:17PM +0200, Octavian Voicu wrote:
On Mon, Mar 22, 2010 at 3:21 PM, Nate Gallaher ngallaher@deepthought.org wrote:
Should --enable-maintainer-mode be purged then, or should some additional flag magic be added? I ran into this a long time ago as well and made the assumption that it had bitrotted.
Actually, in my case the problem is with Ubuntu -- the compiler is configured to activate -D_FORTIFY_SOURCE=2 by default. I tried with:
CFLAGS="-D_FORTIFY_SOURCE=0" ../wine-git/configure --enable-maintainer-mode
and I don't get the spurious warnings any more.
The reason I want maintainer mode is that I want to work a bit on the Wine64 issues. Most of them show up as warnings as I understand.
Well, you could also just ignore the warnings.
Ciao, Marcus
Nate Gallaher ngallaher@deepthought.org writes:
Should --enable-maintainer-mode be purged then, or should some additional flag magic be added? I ran into this a long time ago as well and made the assumption that it had bitrotted.
Maintainer mode is meant to be used by the maintainer, i.e. by me. It works just fine for what I need. There's no real reason for anybody else to use it.