Fix the less-trivial warnings that are output when building with -Wall