c++.command-line - Unused variable warning
- Ron Dunn (5/5) Sep 01 2003 Is there a switch to report "unused variables" as warnings?
- Walter (7/12) Sep 01 2003 that
- Matthew Wilson (5/19) Sep 02 2003 You shocking old dog!
-
Greg Peet
(6/6)
Sep 02 2003
"Matthew Wilson"
wrote in message - Ron Dunn (8/22) Sep 03 2003 Hahahahahah ... what a pleasant change to hear direct from a product dev...
- Cesar Rabak (9/14) Sep 02 2003 As Walter already pointed out, there is none, so if you would like to
- Ron Dunn (9/26) Sep 03 2003 Thank you, Cesar.
Is there a switch to report "unused variables" as warnings? I currently use VC6 for software development, and appreciate the warning that I've declared a variable which is not referenced. I'm a new user of DM, and I can't find a similar warning setting. Advice from more advanced users is appreciated.
Sep 01 2003
"Ron Dunn" <Ron_member pathlink.com> wrote in message news:bj175d$osu$1 digitaldaemon.com...Is there a switch to report "unused variables" as warnings? I currently use VC6 for software development, and appreciate the warningthatI've declared a variable which is not referenced. I'm a new user of DM, and I can't find a similar warning setting. Advicefrommore advanced users is appreciated.There isn't one in DMC, for the rather personal reason that I like to #ifdef out code for various reasons and not need to comment out the declarations for it, too.
Sep 01 2003
You shocking old dog! Put it in. "Walter" <walter digitalmars.com> wrote in message news:bj1cje$10sh$1 digitaldaemon.com..."Ron Dunn" <Ron_member pathlink.com> wrote in message news:bj175d$osu$1 digitaldaemon.com...#ifdefIs there a switch to report "unused variables" as warnings? I currently use VC6 for software development, and appreciate the warningthatI've declared a variable which is not referenced. I'm a new user of DM, and I can't find a similar warning setting. Advicefrommore advanced users is appreciated.There isn't one in DMC, for the rather personal reason that I like toout code for various reasons and not need to comment out the declarations for it, too.
Sep 02 2003
"Matthew Wilson" <matthew stlsoft.org> wrote in message news:bj1tqo$1qqf$1 digitaldaemon.com... | You shocking old dog! | | Put it in. Yes, please do !
Sep 02 2003
Hahahahahah ... what a pleasant change to hear direct from a product developer :) If you should be in a benevolent mood one day, and think about including this feature, make it default to OFF and you won't have to change your working habits. Thanks for the response. Ron. In article <bj1cje$10sh$1 digitaldaemon.com>, Walter says..."Ron Dunn" <Ron_member pathlink.com> wrote in message news:bj175d$osu$1 digitaldaemon.com...Is there a switch to report "unused variables" as warnings? I currently use VC6 for software development, and appreciate the warningthatI've declared a variable which is not referenced. I'm a new user of DM, and I can't find a similar warning setting. Advicefrommore advanced users is appreciated.There isn't one in DMC, for the rather personal reason that I like to #ifdef out code for various reasons and not need to comment out the declarations for it, too.
Sep 03 2003
Ron Dunn escreveu:Is there a switch to report "unused variables" as warnings? I currently use VC6 for software development, and appreciate the warning that I've declared a variable which is not referenced. I'm a new user of DM, and I can't find a similar warning setting. Advice from more advanced users is appreciated.As Walter already pointed out, there is none, so if you would like to have this warning and perhaps for other possible bugs in your code, I recommend you look at Splint http://www.splint.org/ HTH -- Cesar Rabak GNU/Linux User 52247. Get counted: http://counter.li.org/
Sep 02 2003
Thank you, Cesar. I tried splink, and almost had a heart attack at the number of errors and warnings reported on what I thought was good quality code. Once I found the -weak command line parameter the smile started to return to my face. I'd like to move towards stronger checking, but I don't want to rush into littering the code with the on/off comment flags apparently needed by splink at its most defensive. Ron. In article <3F550D80.6010502 uol.com.br>, Cesar Rabak says...Ron Dunn escreveu:Is there a switch to report "unused variables" as warnings? I currently use VC6 for software development, and appreciate the warning that I've declared a variable which is not referenced. I'm a new user of DM, and I can't find a similar warning setting. Advice from more advanced users is appreciated.As Walter already pointed out, there is none, so if you would like to have this warning and perhaps for other possible bugs in your code, I recommend you look at Splint http://www.splint.org/ HTH -- Cesar Rabak GNU/Linux User 52247. Get counted: http://counter.li.org/
Sep 03 2003