Fix some clang static analyzer bugs.