Fixing issues reported by cppcheck (2).