2024-04-11 17:02 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 -D__GNUC__ --platform=unix64 -j1 platform: Linux-5.15.0-102-generic-x86_64-with-glibc2.35 python: 3.10.12 client-version: 1.3.55 compiler: g++ (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0 cppcheck: head 2.13.0 head-info: b9c535c (2024-04-11 18:57:02 +0200) count: 25 17 elapsed-time: 0.3 0.2 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 diff: head python-utmp-0.9/utmpaccessmodule.c:259:15: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable Py_None [valueFlowBailoutIncompleteVar] head python-utmp-0.9/utmpaccessmodule.c:273:21: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PyExc_IOError [valueFlowBailoutIncompleteVar] head python-utmp-0.9/utmpaccessmodule.c:309:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable Py_None [valueFlowBailoutIncompleteVar] head python-utmp-0.9/utmpaccessmodule.c:371:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable Py_None [valueFlowBailoutIncompleteVar] head python-utmp-0.9/utmpaccessmodule.c:422:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable Py_None [valueFlowBailoutIncompleteVar] head python-utmp-0.9/utmpaccessmodule.c:456:25: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PyExc_IOError [valueFlowBailoutIncompleteVar] head python-utmp-0.9/utmpaccessmodule.c:513:15: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable Py_None [valueFlowBailoutIncompleteVar] head python-utmp-0.9/utmpaccessmodule.c:538:15: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable Py_None [valueFlowBailoutIncompleteVar] DONE