[Development] Enabling -Werror developer builds

Thiago Macieira thiago.macieira at intel.com
Tue Aug 20 01:47:07 CEST 2013


On segunda-feira, 19 de agosto de 2013 15:40:06, Alan Alpert wrote:
> > 2) -Werror is enabled only for certain compiler versions. I'll update the
> > whitelist to have an upper range too. For example, right now it enables -
> > Werror for GCC 4.6 and above. I'm going to introduce an upper limit
> > because we don't know what new warnings our code triggers with newer
> > versions of GCC. That means we'll need to first clean up the warnings
> > before expanding the whitelist.
> 
> How is this "clean up" to be managed? The scenario I'm envisioning is
> that warnings are cleaned up inside qtbase, allowing the change to
> pass CI, while a new warning appears in another module which is then
> broken by the qtbase change. We might need to integrate qt5.git
> merging into the whitelist expansion test somehow, or provide another
> solution so that all modules are checked before updating the
> whitelist.

Someone or a group of people fixes all the warnings with a given new compiler 
version in all modules. Once all changes are in, past the CI and possibly past 
a qt5.git integration, we expand the whitelist in qtbase. 

Worst case scenario, there's a race condition with new code that introduces a 
new warning.

> Other than this future concern, setting -Werror like this sounds good
> to me. Some people build with it already so I've received bugs before
> when public headers don't compile with -Werror.

We already have tst_headersclean for that (which builds with -Werror), but 
it's incomplete and not enabled for all modules. I have a more direct and 
complete solution at https://codereview.qt-project.org/45533, at the cost of 
increasing the build time by 20-25%.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/development/attachments/20130819/490bc8fb/attachment.sig>


More information about the Development mailing list