It's easy to get a list unused functions and variables with linker feedback, but how can I detect those unused macro definitions & typedefs? Do I have to browse the code line by line and git grep in the whole project?
For macros defined in source files you might try -Wunused-macros
gcc/clang flag.
There's also -Wunused-local-typedefs
in gcc.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With