Yes, if they explicitly call code that appears useless than a warning makes sense. Not if you write a public API that supports it though.
If you write an API you have a responsibility to ensure it cannot be misused. This is very hard.
If you write an API you have a responsibility to ensure it cannot be misused. This is very hard.