static void bad1(void){}
inline void bad2(void){}
int main(void){return 0;}
The above is the example code. I've originally tracked it down inside a bigger program where this happened.
Compiling it with cc /Wd2135 will produce warning #2135: Static 'bad1' is not referenced.
It seems that presence of inline function in a given file/TU makes /Wd2135 stop working.
If bad2 is commented out or the inline removed from it then the /Wd2135 option correctly disables the warning.