2024-04-26 09:33 ftp://ftp.de.debian.org/debian/pool/main/libs/libspiro/libspiro_20221101.orig.tar.gz cppcheck-options: --library=posix --library=gnu --library=bsd --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 -j4 platform: Linux-6.5.0-28-generic-x86_64-with-glibc2.35 python: 3.10.12 client-version: 1.3.57 compiler: g++ (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0 cppcheck: head 2.14.0 head-info: e5659cc (2024-04-25 21:50:47 +0200) count: 56 56 elapsed-time: 11.1 11.1 head-timing-info: old-timing-info: head results: libspiro-20221101/bezctx.c:63:5: error: Returning/dereferencing 'r' after it is deallocated / released [deallocret] libspiro-20221101/bezctx.c:55:2: note: Returning/dereferencing 'r' after it is deallocated / released libspiro-20221101/bezctx.c:63:5: note: Returning/dereferencing 'r' after it is deallocated / released libspiro-20221101/bezctx.c:179:66: style:inconclusive: Function 'bezctx_mark_knot' argument 3 names different: declaration 'i' definition 'si'. [funcArgNamesDifferent] libspiro-20221101/bezctx_intf.h:40:48: note: Function 'bezctx_mark_knot' argument 3 names different: declaration 'i' definition 'si'. libspiro-20221101/bezctx.c:179:66: note: Function 'bezctx_mark_knot' argument 3 names different: declaration 'i' definition 'si'. libspiro-20221101/tests/call-test.c:249:15: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SPIRO_G4 [valueFlowBailoutIncompleteVar] libspiro-20221101/tests/call-test.c:512:38: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable bezctx [valueFlowBailoutIncompleteVar] libspiro-20221101/tests/call-test.c:570:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] libspiro-20221101/spiro.c:1396:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LS_VERSION_STR [valueFlowBailoutIncompleteVar] libspiro-20221101/spiro.c:440:36: style: Parameter 'dm' can be declared as pointer to const [constParameterPointer] libspiro-20221101/spiro.c:782:43: style: Parameter 'derivs' can be declared as const array [constParameter] libspiro-20221101/spiro.c:805:65: style: Parameter 'jinca' can be declared as pointer to const [constParameterPointer] libspiro-20221101/tests/call-test.c:54:5: style: Obsolescent function 'ftime' called. It is recommended to use 'time', 'gettimeofday' or 'clock_gettime' instead. [prohibitedftimeCalled] libspiro-20221101/tests/call-test.c:214:9: style: Variable 'knot0' can be declared as const array [constVariable] libspiro-20221101/tests/call-test.c:225:9: style: Variable 'knot1' can be declared as const array [constVariable] libspiro-20221101/tests/call-test.c:234:9: style: Variable 'knot2' can be declared as const array [constVariable] libspiro-20221101/tests/call-test.c:245:9: style: Variable 'knot3' can be declared as const array [constVariable] libspiro-20221101/tests/call-test.c:254:9: style: Variable 'knot4' can be declared as const array [constVariable] libspiro-20221101/tests/call-test.c:271:9: style: Variable 'knot5' can be declared as const array [constVariable] libspiro-20221101/tests/call-test.c:288:9: style: Variable 'knot6' can be declared as const array [constVariable] libspiro-20221101/tests/call-test.c:302:9: style: Variable 'knot7' can be declared as const array [constVariable] libspiro-20221101/tests/call-test.c:315:9: style: Variable 'knot10' can be declared as const array [constVariable] libspiro-20221101/tests/call-test.c:328:9: style: Variable 'knot11' can be declared as const array [constVariable] libspiro-20221101/tests/call-test.c:341:9: style: Variable 'knot13' can be declared as const array [constVariable] libspiro-20221101/tests/call-test.c:494:26: style: Parameter 'bc' can be declared as pointer to const. However it seems that 'test_moveto' is a callback function, if 'bc' is declared with const you might also need to cast function pointer(s). [constParameterCallback] libspiro-20221101/tests/call-test.c:514:22: note: You might need to cast the function pointer here libspiro-20221101/tests/call-test.c:494:26: note: Parameter 'bc' can be declared as pointer to const libspiro-20221101/tests/call-test.c:497:26: style: Parameter 'bc' can be declared as pointer to const. However it seems that 'test_lineto' is a callback function, if 'bc' is declared with const you might also need to cast function pointer(s). [constParameterCallback] libspiro-20221101/tests/call-test.c:515:22: note: You might need to cast the function pointer here libspiro-20221101/tests/call-test.c:497:26: note: Parameter 'bc' can be declared as pointer to const libspiro-20221101/tests/call-test.c:500:26: style: Parameter 'bc' can be declared as pointer to const. However it seems that 'test_quadto' is a callback function, if 'bc' is declared with const you might also need to cast function pointer(s). [constParameterCallback] libspiro-20221101/tests/call-test.c:516:22: note: You might need to cast the function pointer here libspiro-20221101/tests/call-test.c:500:26: note: Parameter 'bc' can be declared as pointer to const libspiro-20221101/tests/call-test.c:503:27: style: Parameter 'bc' can be declared as pointer to const. However it seems that 'test_curveto' is a callback function, if 'bc' is declared with const you might also need to cast function pointer(s). [constParameterCallback] libspiro-20221101/tests/call-test.c:517:23: note: You might need to cast the function pointer here libspiro-20221101/tests/call-test.c:503:27: note: Parameter 'bc' can be declared as pointer to const libspiro-20221101/tests/call-test.c:507:29: style: Parameter 'bc' can be declared as pointer to const. However it seems that 'test_mark_knot' is a callback function, if 'bc' is declared with const you might also need to cast function pointer(s). [constParameterCallback] libspiro-20221101/tests/call-test.c:518:25: note: You might need to cast the function pointer here libspiro-20221101/tests/call-test.c:507:29: note: Parameter 'bc' can be declared as pointer to const libspiro-20221101/tests/call-test.c:528:20: style: Variable 'rsp' can be declared as pointer to const [constVariablePointer] libspiro-20221101/tests/call-test.c:534:21: style: Variable 'd[1]' is assigned a value that is never used. [unreadVariable] libspiro-20221101/tests/call-test.c:534:28: style: Variable 'd[2]' is assigned a value that is never used. [unreadVariable] libspiro-20221101/tests/call-test.c:1211:12: error: Uninitialized variable: ret [uninitvar] libspiro-20221101/tests/call-test.c:1131:9: style: Variable 'ret' is not assigned a value. [unassignedVariable] libspiro-20221101/tests/call-test.c:562:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] libspiro-20221101/tests/call-test.c:553:35: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SPIRO_ARC_MAYBE [valueFlowBailoutIncompleteVar] libspiro-20221101/tests/call-test.c:529:13: style: Unused variable: done [unusedVariable] libspiro-20221101/tests/call-test.c:539:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] libspiro-20221101/tests/call-test21.c:49:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable x [valueFlowBailoutIncompleteVar] libspiro-20221101/tests/call-test21.c:173:21: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable ty [valueFlowBailoutIncompleteVar] libspiro-20221101/tests/call-test21.c:209:45: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable ty [valueFlowBailoutIncompleteVar] libspiro-20221101/tests/call-test21.c:242:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SPIRO_CUBIC_TO_BEZIER [valueFlowBailoutIncompleteVar] libspiro-20221101/tests/call-test21.c:65:38: style: Parameter 'bc' can be declared as pointer to const [constParameterPointer] libspiro-20221101/tests/call-test21.c:67:16: style: Variable 'expect0' can be declared as const array [constVariable] libspiro-20221101/tests/call-test21.c:115:16: style: Variable 'expect6' can be declared as const array [constVariable] libspiro-20221101/tests/call-test21.c:204:36: style: Parameter 'bc' can be declared as pointer to const [constParameterPointer] libspiro-20221101/tests/call-test21.c:166:11: style: Unused variable: j [unusedVariable] libspiro-20221101/tests/call-test21.c:166:13: style: Unused variable: k [unusedVariable] libspiro-20221101/tests/call-test21.c:238:9: style: Unused variable: i [unusedVariable] libspiro-20221101/tests/call-test.c:526:16: style: Variable 'segs' can be declared as pointer to const [constVariablePointer] libspiro-20221101/tests/call-test.c:526:16: style: Variable 'segs' is assigned a value that is never used. [unreadVariable] libspiro-20221101/tests/call-test.c:528:20: style: Unused variable: rsp [unusedVariable] libspiro-20221101/tests/call-test.c:529:11: style: Unused variable: j [unusedVariable] libspiro-20221101/tests/call-test.c:1144:8: style: Suspicious condition (assignment + comparison); Clarify expression with parentheses. [clarifyCondition] libspiro-20221101/tests/call-test.c:919:36: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable S_TESTP [valueFlowBailoutIncompleteVar] libspiro-20221101/tests/unit-test.c:62:9: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable ORDER [valueFlowBailoutIncompleteVar] libspiro-20221101/tests/unit-test.c:151:22: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable x [valueFlowBailoutIncompleteVar] libspiro-20221101/tests/unit-test.c:49:5: style: Obsolescent function 'ftime' called. It is recommended to use 'time', 'gettimeofday' or 'clock_gettime' instead. [prohibitedftimeCalled] libspiro-20221101/tests/call-test.c:890:10: style: Variable 'pk' can be declared as pointer to const [constVariablePointer] diff: DONE