configure.ac: add -Werror to default compiler options

Michael Stefaniuc mstefani at redhat.com
Thu Sep 1 05:18:16 CDT 2011


Dan Kegel wrote:
> (Reviving http://www.winehq.org/pipermail/wine-devel/2008-September/069266.html
> )
> 
> After
> http://www.winehq.org/pipermail/wine-patches/2011-August/106150.html and
> http://www.winehq.org/pipermail/wine-patches/2011-August/106151.html,
> configuring with -Wall -Werror gives the right results,
> judging by a quick diff of config.h and config.status.
> 
> (sys/asoundlib.h is not detected, but that's ok, it's marked as obsolete,
> and wine uses alsa/asoundlib.h instead.)
> 
> This takes care of Maarten's concerns from the earlier thread.
> 
> Then building yields only a tiny handful of errors:
> 
> dllfunc.c: In function ‘AMovieDllRegisterServer2’:
> dllfunc.c:180: warning: dereferencing type-punned pointer will break
> strict-aliasing rules
> qualitycontrol.c: In function ‘QualityControlImpl_Notify’:
> qualitycontrol.c:70: warning: dereferencing type-punned pointer will
> break strict-aliasing rules
> transform.c: In function ‘TransformFilterImpl_QueryInterface’:
> transform.c:248: warning: dereferencing type-punned pointer will break
> strict-aliasing rules
> ../../include/winternl.h: In function ‘get_vm86_teb_info’:
> ../../include/winternl.h:2660: warning: dereferencing type-punned
> pointer will break strict-aliasing rules
> ...
> register.c: In function ‘create_registrar’:
> register.c:66: warning: dereferencing type-punned pointer will break
> strict-aliasing rules
> 
> Those are potential, if unlikely, bugs; we ought to either fix them or
> add -fno-strict-aliasing
> to CFLAGS for the seven or so affected .c files.
> 
> At which point it would probably be a fine idea to add -Werror by default;
> buildbot will help keep everyone in sync, even if they're using a compiler
> that doesn't catch as many warnings as the one buildbot uses.
You can try submitting a patch to add -Werror by default but I already
know the patch status that it will get:
  REJECTED!!11!!
You might get away with enabling it for the buildbot as you can enforce
a controlled environment. But enabling it in general is such a bad idea
that it isn't funny. No clue why people insist to still do it. Ask
packagers what they think about upstreams that do that, disabling that
is one of the first actions they do.

bye
	michael



More information about the wine-devel mailing list