2025-05-07 20:39 ftp://ftp.de.debian.org/debian/pool/main/r/ros-rospack/ros-rospack_2.6.2.orig.tar.gz cppcheck-options: --library=posix --library=gnu --library=bsd --library=boost --library=python --library=tinyxml2 --library=googletest --inconclusive --enable=style,information --inline-suppr --template=daca2 --disable=missingInclude --suppress=unmatchedSuppression --check-library --debug-warnings --suppress=autoNoType --suppress=valueFlowBailout --suppress=bailoutUninitVar --suppress=symbolDatabaseWarning --suppress=normalCheckLevelConditionExpressions -D__GNUC__ --platform=unix64 -j1 platform: Linux-6.8.0-59-generic-x86_64-with-glibc2.39 python: 3.12.3 client-version: 1.3.67 compiler: g++ (Ubuntu 14.2.0-4ubuntu2~24.04) 14.2.0 cppcheck: head 2.17.0 head-info: ebc80c0 (2025-05-07 18:59:31 +0200) count: 66 63 elapsed-time: 1.5 1.4 head-timing-info: old-timing-info: head results: rospack-2.6.2/src/rospack.cpp:300:25: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable token_compress_on [valueFlowBailoutIncompleteVar] rospack-2.6.2/src/rospack.cpp:314:3: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable quiet_ [valueFlowBailoutIncompleteVar] rospack-2.6.2/src/rospack.cpp:340:36: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable manifest_name_ [valueFlowBailoutIncompleteVar] rospack-2.6.2/src/rospack.cpp:366:46: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable search_paths_ [valueFlowBailoutIncompleteVar] rospack-2.6.2/src/rospack.cpp:560:20: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable quiet_ [valueFlowBailoutIncompleteVar] rospack-2.6.2/src/rospack.cpp:607:38: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable POSTORDER [valueFlowBailoutIncompleteVar] rospack-2.6.2/src/rospack.cpp:676:34: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable POSTORDER [valueFlowBailoutIncompleteVar] rospack-2.6.2/src/rospack.cpp:705:36: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable POSTORDER [valueFlowBailoutIncompleteVar] rospack-2.6.2/src/rospack.cpp:780:36: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable POSTORDER [valueFlowBailoutIncompleteVar] rospack-2.6.2/src/rospack.cpp:897:22: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable Py_None [valueFlowBailoutIncompleteVar] rospack-2.6.2/src/rospack.cpp:1171:34: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable POSTORDER [valueFlowBailoutIncompleteVar] rospack-2.6.2/src/rospack.cpp:1205:6: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable quiet_ [valueFlowBailoutIncompleteVar] rospack-2.6.2/src/rospack.cpp:1219:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stackages_ [valueFlowBailoutIncompleteVar] rospack-2.6.2/src/rospack.cpp:1243:24: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stackages_ [valueFlowBailoutIncompleteVar] rospack-2.6.2/src/rospack.cpp:1315:38: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable POSTORDER [valueFlowBailoutIncompleteVar] rospack-2.6.2/src/rospack.cpp:1407:49: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable manifest_name_ [valueFlowBailoutIncompleteVar] rospack-2.6.2/src/rospack.cpp:1555:28: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable EACCES [valueFlowBailoutIncompleteVar] rospack-2.6.2/src/rospack.cpp:1578:82: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable XML_SUCCESS [valueFlowBailoutIncompleteVar] rospack-2.6.2/src/rospack.cpp:1600:27: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable quiet_ [valueFlowBailoutIncompleteVar] rospack-2.6.2/src/rospack.cpp:1644:29: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable quiet_ [valueFlowBailoutIncompleteVar] rospack-2.6.2/src/rospack.cpp:1885:19: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PREORDER [valueFlowBailoutIncompleteVar] rospack-2.6.2/src/rospack.cpp:1973:17: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable cache_prefix_ [valueFlowBailoutIncompleteVar] rospack-2.6.2/src/rospack.cpp:2079:25: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable S_IXUSR [valueFlowBailoutIncompleteVar] rospack-2.6.2/src/rospack.cpp:2200:25: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable npos [valueFlowBailoutIncompleteVar] rospack-2.6.2/src/rospack.cpp:1951:22: portability: Non reentrant function 'getpwuid' called. For threadsafe applications it is recommended to use the reentrant replacement function 'getpwuid_r'. [prohibitedgetpwuidCalled] rospack-2.6.2/src/rospack.cpp:134:5: style: Class 'Exception' has a constructor with 1 argument that is not explicit. [noExplicitConstructor] rospack-2.6.2/src/rospack.cpp:1987:3: portability: %lu in format string (no. 1) requires 'unsigned long' but the argument type is 'size_t {aka unsigned long}'. [invalidPrintfArgType_uint] rospack-2.6.2/src/rospack.cpp:823:15: style: The scope of the variable 'init_py' can be reduced. [variableScope] rospack-2.6.2/src/rospack.cpp:824:20: style: The scope of the variable 'pName' can be reduced. [variableScope] rospack-2.6.2/src/rospack.cpp:825:20: style: The scope of the variable 'pModule' can be reduced. [variableScope] rospack-2.6.2/src/rospack.cpp:826:20: style: The scope of the variable 'pDict' can be reduced. [variableScope] rospack-2.6.2/src/rospack.cpp:827:20: style: The scope of the variable 'pFunc' can be reduced. [variableScope] rospack-2.6.2/src/rospack.cpp:930:20: style: The scope of the variable 'pName' can be reduced. [variableScope] rospack-2.6.2/src/rospack.cpp:931:20: style: The scope of the variable 'pModule' can be reduced. [variableScope] rospack-2.6.2/src/rospack.cpp:408:18: style: Local variable 'path' shadows outer variable [shadowVariable] rospack-2.6.2/src/rospack.cpp:402:12: note: Shadowed declaration rospack-2.6.2/src/rospack.cpp:408:18: note: Shadow variable rospack-2.6.2/src/rospack.cpp:790:21: style: Local variable 'result' shadows outer variable [shadowVariable] rospack-2.6.2/src/rospack.cpp:772:8: note: Shadowed declaration rospack-2.6.2/src/rospack.cpp:790:21: note: Shadow variable rospack-2.6.2/src/rospack.cpp:848:54: style: Local variable 'it' shadows outer variable [shadowVariable] rospack-2.6.2/src/rospack.cpp:837:48: note: Shadowed declaration rospack-2.6.2/src/rospack.cpp:848:54: note: Shadow variable rospack-2.6.2/src/rospack.cpp:1118:38: style: Local variable 'it' shadows outer variable [shadowVariable] rospack-2.6.2/src/rospack.cpp:1101:64: note: Shadowed declaration rospack-2.6.2/src/rospack.cpp:1118:38: note: Shadow variable rospack-2.6.2/src/rospack.cpp:1114:42: style: Local variable 'it' shadows outer variable [shadowVariable] rospack-2.6.2/src/rospack.cpp:1101:64: note: Shadowed declaration rospack-2.6.2/src/rospack.cpp:1114:42: note: Shadow variable rospack-2.6.2/src/rospack.cpp:1129:46: style: Local variable 'it' shadows outer variable [shadowVariable] rospack-2.6.2/src/rospack.cpp:1101:64: note: Shadowed declaration rospack-2.6.2/src/rospack.cpp:1129:46: note: Shadow variable rospack-2.6.2/src/rospack.cpp:426:31: style: Variable 'e' can be declared as reference to const [constVariableReference] rospack-2.6.2/src/rospack.cpp:232:52: style: Parameter 'i' can be declared as pointer to const. However it seems that 'cmpDirectoryCrawlRecord' is a callback function, if 'i' is declared with const you might also need to cast function pointer(s). [constParameterCallback] rospack-2.6.2/src/rospack.cpp:1363:39: note: You might need to cast the function pointer here rospack-2.6.2/src/rospack.cpp:232:52: note: Parameter 'i' can be declared as pointer to const rospack-2.6.2/src/rospack.cpp:233:52: style: Parameter 'j' can be declared as pointer to const. However it seems that 'cmpDirectoryCrawlRecord' is a callback function, if 'j' is declared with const you might also need to cast function pointer(s). [constParameterCallback] rospack-2.6.2/src/rospack.cpp:1363:39: note: You might need to cast the function pointer here rospack-2.6.2/src/rospack.cpp:233:52: note: Parameter 'j' can be declared as pointer to const rospack-2.6.2/src/rospack.cpp:494:7: style: Consider using std::any_of algorithm instead of a raw loop. [useStlAlgorithm] rospack-2.6.2/src/rospack.cpp:1321:9: style: Consider using std::any_of algorithm instead of a raw loop. [useStlAlgorithm] rospack-2.6.2/src/rospack.cpp:2257:26: style: Variable 'errmsg' is assigned a value that is never used. [unreadVariable] rospack-2.6.2/src/rospack.cpp:2257:19: style: Variable 'errmsg' is assigned a value that is never used. [unreadVariable] rospack-2.6.2/src/rospack_backcompat.cpp:46:55: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable output_ [valueFlowBailoutIncompleteVar] rospack-2.6.2/src/rospack_backcompat.cpp:66:23: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable token_compress_on [valueFlowBailoutIncompleteVar] rospack-2.6.2/src/rospack_backcompat.cpp:82:11: style: Local variable 'i' shadows outer variable [shadowVariable] rospack-2.6.2/src/rospack_backcompat.cpp:69:7: note: Shadowed declaration rospack-2.6.2/src/rospack_backcompat.cpp:82:11: note: Shadow variable rospack-2.6.2/src/rospack_cmdline.cpp:328:27: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable token_compress_on [valueFlowBailoutIncompleteVar] rospack-2.6.2/src/rospack_cmdline.cpp:844:3: style: Exception should be caught by reference. [catchExceptionByValue] rospack-2.6.2/src/utils.cpp:47:23: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable token_compress_on [valueFlowBailoutIncompleteVar] rospack-2.6.2/src/utils.cpp:85:23: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable token_compress_on [valueFlowBailoutIncompleteVar] rospack-2.6.2/test/test/utest.cpp:262:121: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable endl [valueFlowBailoutIncompleteVar] rospack-2.6.2/test/test/utest.cpp:293:121: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable endl [valueFlowBailoutIncompleteVar] rospack-2.6.2/test/test/utest.cpp:385:18: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable ROSPACK_NAME [valueFlowBailoutIncompleteVar] rospack-2.6.2/test/test/utest.cpp:271:14: style: Variable 'dep' can be declared as reference to const [constVariableReference] rospack-2.6.2/test/test/utest.cpp:274:16: style: Variable 'line' can be declared as reference to const [constVariableReference] rospack-2.6.2/test/test/utest.cpp:302:14: style: Variable 'dep' can be declared as reference to const [constVariableReference] rospack-2.6.2/test/test/utest.cpp:305:16: style: Variable 'line' can be declared as reference to const [constVariableReference] rospack-2.6.2/test/test/utest.cpp:148:9: style: Variable 'oldrpp' can be declared as pointer to const [constVariablePointer] rospack-2.6.2/test/test/utest.cpp:322:9: style: Variable 'oldrpp' can be declared as pointer to const [constVariablePointer] rospack-2.6.2/test/test/utest.cpp:267:0: style: Consider using std::any_of algorithm instead of a raw loop. [useStlAlgorithm] rospack-2.6.2/test/test/utest.cpp:298:0: style: Consider using std::any_of algorithm instead of a raw loop. [useStlAlgorithm] rospack-2.6.2/test/test/utest.cpp:328:15: style: Unused variable: output [unusedVariable] diff: head rospack-2.6.2/src/rospack.cpp:2257:19: style: Variable 'errmsg' is assigned a value that is never used. [unreadVariable] head rospack-2.6.2/test/test/utest.cpp:267:0: style: Consider using std::any_of algorithm instead of a raw loop. [useStlAlgorithm] head rospack-2.6.2/test/test/utest.cpp:298:0: style: Consider using std::any_of algorithm instead of a raw loop. [useStlAlgorithm] DONE