Fix a few warnings seen with the clang static analysis tool.