Clean up compiler warnings and enable them

This doesn't quite go all the way, in that leaves unused function warnings disabled for the moment.