Fix some useless code detected by scan-build (LLVM/Clang)