David Connell

Software Developer - Red Gate Software

Always set Warnings as Errors

Published Friday, November 18, 2005 4:08 PM

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.

Comments

No Comments
You need to sign in to comment on this blog

















<November 2005>
SuMoTuWeThFrSa
303112345
6789101112
13141516171819
20212223242526
27282930123
45678910
Reporting on Mobile Device Activity Using Exchange 2007 ActiveSync Logs
 In this new column giving practical advice on all things Sys Admin related, Ben Lye takes on the often... Read more...

The Bejeweled Puzzle in SQL
 Alex Kozak provides another SQL puzzle to hone your SQL Skills with.  Read more...

Using Powershell to Generate Table-Creation Scripts
 For all of us who learn best by trying out examples, Bob Sheldon produces a PowerShell script file for... Read more...

Configuring Exchange Server 2007 to Support Information Rights Management
 In Exchange Server 2007, Information Rights management is easy to set up once you have set up the... Read more...

SQL Response: The dim sum interview
 Richard Morris met David and Nigel of the SQL Response team, in a dim sum Restaurant in Cambridge. They... Read more...