Fix trivial issues in PR#3305

This should fix trivial cppcheck issues discovered in PR#3305