Warnings as Errors

When building open source software because there isn’t a package available for Tumbleweed, I often see lots of compiler warnings. This annoys me.

In every language I have worked with, I’ve been a believer in treating warnings as errors and resolving them, even going as far as resolving E_NOTICE warnings in PHP. Why yes, I am a bit obsessive thank you for asking. But, on a more serious note:

  • Compiler warnings mean you’re probably doing something stupid.
  • Compiler warnings may mean you’re writing code that will actually crash, such as, returning a reference to a local variable.
  • The sheer satisfaction that comes from a clean build.

 

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.