Fix compiler warnings

These 2 commits make the build much cleaner. I was seeing warnings for almost every source file until I made these changes, which makes it harder to spot "real" problems.