Warning fixes

Your rewrite of my warning-fixes patches left out a few things. They are included in this commit.