Remove undef array indice.

Spotted by LLVM/Clang.
Remove dead assignment.

Spotted by LLVM/Clang.
Msg could be free uninitialized.

Spotted by LLVM/Clang.