Wish: Variable Not Used Warning

Markus Koskimies markus at reaaliaika.net
Thu Jul 10 13:32:23 PDT 2008


On Thu, 10 Jul 2008 12:51:47 -0700, Walter Bright wrote:

> Robert Fraser wrote:
>> In a final release, unused things are signs of errors. When writing
>> code, unused variables (perhaps they were used in a commented-out
>> section?) are a dime a dozen.
> 
> Yes, that's why I find the warning to be a nuisance, not a help.

I'd been coding for awhile, and I have hard times to remember the last 
time I have had unused vars or other pieces of code, that would be there 
intentionally... Sure, I may have got some sort of brain-damage due to 
heavy use of "gcc -Wall" and "lint" to affect to my coding style so that 
I unconsciously avoid warning-generating sketchs...

About those unused imports (mentioned by Robert) - I think that the 
compiler could stop also with those. I was just coming to that subject :D



More information about the Digitalmars-d mailing list