Reputation: 11694
This question is in continuation to Is there a decent tool for automatically cleaning the crap out of VS solution directories?. It would be great if there is some tool that would allow to remove the hanging code (code not being used). Examples would be unused variables,references,functions or even class (old code or code only written for experimentation).
Upvotes: 2
Views: 228
Reputation: 11998
Klocwork had some capabilities to point out legacy code hanging around.
Also, GCC has warnings that can be enabled that will catch a lot of trivial things like unused varaibles or static functions.
Upvotes: 0
Reputation: 4807
Certain versions of Visual Studio 2008 (development edition for sure) have a code analysis tool that can help.
Upvotes: 0
Reputation: 28250
Good linkers will remove unused code from an executable. It is an optimization option. This likely will not work for public functions on shared libraries, but internal code will get trimmed if there are no ways into it.
Check your linker though(or maybe compiler-- depending on language).
Upvotes: 0