Login | Register   
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: C++
Expertise: All
Apr 4, 2000

Remove "Dead Declaration" From Your Code

Applications constantly undergo modifications, bug fixes, and customization. Programmers often remove pieces of obsolete code that use a variable while leaving the declaration of that variable intact. A clever compiler can detect an unused variable and issue a warning message. However, not every compiler does that, and even compilers that do so are often configured to suppress warnings to minimize "noise." The problem with such unused variables is that they clutter up the code and might mislead future maintainers of the code. For this reason, you should add an additional phase to your code review: "elimination of dead declarations." You may be surprised by how many such dead declarations exist in every sizable project.
Danny Kalev
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap