Warn on unused variables

Hacked this together tonight.  I'll have to run this against our code base to see that it works, but feel free to comment in the meanwhile.