Fixed warnings from Clang static analysis.