fix clang-analyzer reported warnings.