Whilst refactoring some old code I realised that a particular header file was full of function declarations for functions long since removed from the .cpp file.Does anyone know of a tool that could find (and strip) these automatically?
That will end up being one more set of additions for each function that is written.Additionally, if a function call is missed in this test file that doesn't do anything, at some point, it will be near-impossible to know about that.
Agreed, I was thinking more as a one off to test the area being refactored. It's not a long term solution, another approach might be to use VERBOSE output on the linker.
Not so. PC-Lint is good for a lot of things as well as this. Just remember to turn off all warnings and slowly turn them on as you need them. Really, you only need a select core of about 2 dozen to improve your code base. Being pedantic and linting to the max makes your code butt-ugly.