Remove warnings spotted by llvm/clang static analyzer.