Clean up warnings
Merge pull request #1996 from ethomson/warnings

Clean up warnings