Always set Warnings as Errors

How many of us have developed some code only to find the compiler outputs some warnings such as unused parameter, or unreachable code and just thought “yup, I’ll fix it tomorrow”. Unfortunately tomorrow never comes and the warning just get left in. Before you know it when you build a project there are hundreds of warnings and the new ones just get missed.

As a result I have found that the only way forward is to set warnings as errors and crank the warning level as high as possible.

It’s a bit radical however developers must then either fix the warnings or suppress them.(Developers will only suppress warnings when there is no way round and do not suppress warnings unnecessarily.)

It maybe a painful road but in the end the builds are always better and easier to understand because there are never any warnings.