cppcheck performance fixes in addons/