2025-05-07 07:42 ftp://ftp.de.debian.org/debian/pool/main/p/python-utmp/python-utmp_0.9.orig.tar.gz cppcheck-options: --library=posix --library=gnu --library=bsd --library=python --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 -j3 platform: Linux-6.8.0-1022-oracle-aarch64-with-glibc2.39 python: 3.12.3 client-version: 1.3.67 compiler: g++ (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0 cppcheck: head 2.17.0 head-info: 8e656e5 (2025-05-06 23:42:00 +0200) count: 26 25 elapsed-time: 0.1 0.1 head-timing-info: old-timing-info: head results: python-utmp-0.9/makeconst.c:25:5: portability: %i in format string (no. 1) requires 'int' but the argument type is 'size_t {aka unsigned long}'. [invalidPrintfArgType_sint] python-utmp-0.9/makeconst.c:26:5: portability: %i in format string (no. 1) requires 'int' but the argument type is 'size_t {aka unsigned long}'. [invalidPrintfArgType_sint] python-utmp-0.9/makeconst.c:28:5: portability: %i in format string (no. 1) requires 'int' but the argument type is 'size_t {aka unsigned long}'. [invalidPrintfArgType_sint] python-utmp-0.9/utmpaccessmodule.c:233:15: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable Py_None [valueFlowBailoutIncompleteVar] python-utmp-0.9/utmpaccessmodule.c:259:15: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable Py_None [valueFlowBailoutIncompleteVar] python-utmp-0.9/utmpaccessmodule.c:273:21: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PyExc_IOError [valueFlowBailoutIncompleteVar] python-utmp-0.9/utmpaccessmodule.c:309:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable Py_None [valueFlowBailoutIncompleteVar] python-utmp-0.9/utmpaccessmodule.c:371:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable Py_None [valueFlowBailoutIncompleteVar] python-utmp-0.9/utmpaccessmodule.c:422:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable Py_None [valueFlowBailoutIncompleteVar] python-utmp-0.9/utmpaccessmodule.c:456:25: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PyExc_IOError [valueFlowBailoutIncompleteVar] python-utmp-0.9/utmpaccessmodule.c:513:15: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable Py_None [valueFlowBailoutIncompleteVar] python-utmp-0.9/utmpaccessmodule.c:538:15: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable Py_None [valueFlowBailoutIncompleteVar] python-utmp-0.9/utmpaccessmodule.c:213:5: warning:inconclusive: The buffer '_utmpfilename' may not be null-terminated after the call to strncpy(). [terminateStrncpy] python-utmp-0.9/utmpaccessmodule.c:278:2: error: Resource leak: f [resourceLeak] python-utmp-0.9/utmpaccessmodule.c:457:6: error: Resource leak: f [resourceLeak] python-utmp-0.9/utmpaccessmodule.c:462:6: error: Resource leak: f [resourceLeak] python-utmp-0.9/utmpaccessmodule.c:28:21: style: Parameter 's' can be declared as pointer to const [constParameterPointer] python-utmp-0.9/utmpaccessmodule.c:54:21: style: Parameter 's' can be declared as pointer to const [constParameterPointer] python-utmp-0.9/utmpaccessmodule.c:129:16: style: Parameter 'm' can be declared as pointer to const [constParameterPointer] python-utmp-0.9/utmpaccessmodule.c:211:7: style: Parameter 'name' can be declared as pointer to const [constParameterPointer] python-utmp-0.9/utmpaccessmodule.c:254:11: style: Parameter 'args' can be declared as pointer to const. However it seems that 'utmp_setutent' is a callback function, if 'args' is declared with const you might also need to cast function pointer(s). [constParameterCallback] python-utmp-0.9/utmpaccessmodule.c:545:19: note: You might need to cast the function pointer here python-utmp-0.9/utmpaccessmodule.c:254:11: note: Parameter 'args' can be declared as pointer to const python-utmp-0.9/utmpaccessmodule.c:299:11: style: Parameter 'args' can be declared as pointer to const. However it seems that 'utmp_getutent' is a callback function, if 'args' is declared with const you might also need to cast function pointer(s). [constParameterCallback] python-utmp-0.9/utmpaccessmodule.c:546:19: note: You might need to cast the function pointer here python-utmp-0.9/utmpaccessmodule.c:299:11: note: Parameter 'args' can be declared as pointer to const python-utmp-0.9/utmpaccessmodule.c:382:21: style: Parameter 'u' can be declared as pointer to const [constParameterPointer] python-utmp-0.9/utmpaccessmodule.c:434:25: style: Variable 'a' can be declared as pointer to const [constVariablePointer] python-utmp-0.9/utmpaccessmodule.c:533:11: style: Parameter 'args' can be declared as pointer to const. However it seems that 'utmp_endutent' is a callback function, if 'args' is declared with const you might also need to cast function pointer(s). [constParameterCallback] python-utmp-0.9/utmpaccessmodule.c:547:19: note: You might need to cast the function pointer here python-utmp-0.9/utmpaccessmodule.c:533:11: note: Parameter 'args' can be declared as pointer to const python-utmp-0.9/utmpaccessmodule.c:390:28: warning: Uninitialized variable: u [uninitvar] python-utmp-0.9/utmpaccessmodule.c:419:27: note: Calling function 'my_getutline', 1st argument '&entry' value is python-utmp-0.9/utmpaccessmodule.c:390:28: note: Uninitialized variable: u diff: head python-utmp-0.9/utmpaccessmodule.c:390:28: warning: Uninitialized variable: u [uninitvar] python-utmp-0.9/utmpaccessmodule.c:419:27: note: Calling function 'my_getutline', 1st argument '&entry' value is python-utmp-0.9/utmpaccessmodule.c:390:28: note: Uninitialized variable: u DONE