Remove cppcheck warnings, update port file.