Fixing cppcheck error