clang-analyzer: fix two warnings (one potentially unsafe)