Robert Lewis

C - used and unused constants in header files, how to resolve?

Discussion created by Robert Lewis on Apr 11, 2007
Latest reply on Apr 23, 2007 by Robert Lewis
Can anyone recommend the best way to find dead constant defines in a header that is included into a module, and or the constants that are used?

Over time I have added defines to header files and would like to clean up the headers now, but it is an overwhelming task. There are many headers and some have a few constants that are needed and many that are not. Short of commenting out the lines and compiling, or doing a search through each file with the definition I can not see a good way to do this. Does anyone know of a software tool that would list all constants used versus dead constants in a module. Or is there a way to do this in CW? We have the professional version of CW.

Thanks inadvance