Fix some clang scan-build warnings