[Openchrome-devel] [PATCH] Treat all build warnings as errors

Xavier Bachelot xavier at bachelot.org
Thu Aug 11 13:45:32 UTC 2016


Hi,

On 05/08/2016 17:09, Xavier Bachelot wrote:
> On 05/08/2016 04:40, Bartosz wrote:
>>     Also there will be a lot of warnings which will need to be resolved.
>>     Fortunately fixing warnings will be a good task for novice developer.
>>
>>     What do you think about enabling "-Wall"?
>>
>>     Best Regards
>>     Bartosz
>>
>>
> Hi,
>
> Enabling -Wall is probably a good idea, but we need to first fix all the
> warnings then enable it. If we do it the other way, we'll be stuck with
> build failures until all the warnings are fixed.
> We probably want to also change the CFLAGS for the xvmc and tools
> subdirs Makefiles.
>
Enabling -Wall now is not a problem indeed, -Werror is. Sorry for the 
bad wording, I was confused after sending the -Werror patch.

> I suggest we use https://bugs.freedesktop.org/show_bug.cgi?id=96399 to
> track this issue. I already attached some patches there.
>
Rather than attaching patches to the above bug, I pushed my changes to 
my fdo tree in the fix_warnings branch. The patches I posted to the 
mailing list a few days ago were white-space damaged by my mailer anyway.

git://people.freedesktop.org/~xavierb/xf86-video-openchrome fix_warnings

I choose to first enable -Wall, to make all the warning visible, then 
start to clean them.
-Werror can either be added when all warning are cleared, or can be 
added now together with a couple of -Wno-something.
I'd rather wait before enabling -Werror, as there are still a sizable 
number of warnings in the current code and adding -Wno-something would 
hide what -Wall unhide.

Please review and apply.

Indeed, feel free to send more patches or attach them to the bug, I can 
add them to my tree or Kevin can apply them to master directly.

Regards,
Xavier


More information about the Openchrome-devel mailing list