Fix no unused parameter to not trigger in cases when it shouldn't

Specifically, any parameter modified with a "public" keyword will
be ignored (since they make public member variables) and method
declarations will also be ignored (as they should be).