Fix compiler errors and warnings using the Clang compiler.