2024-04-13 13:19 ftp://ftp.de.debian.org/debian/pool/main/t/tre/tre_0.8.0.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 -j4 platform: Linux-6.1.0-18-amd64-x86_64-with-glibc2.36 python: 3.11.2 client-version: 1.3.56 compiler: g++ (Debian 12.2.0-14) 12.2.0 cppcheck: head 2.13.0 head-info: 26da798 (2024-04-13 11:33:47 +0200) count: 77 63 elapsed-time: 14.0 38.5 head-timing-info: old-timing-info: head results: tre-0.8.0/lib/regcomp.c:22:55: style:inconclusive: Function 'tre_regncomp' argument 3 names different: declaration 'len' definition 'n'. [funcArgNamesDifferent] tre-0.8.0/lib/tre.h:162:55: note: Function 'tre_regncomp' argument 3 names different: declaration 'len' definition 'n'. tre-0.8.0/lib/regcomp.c:22:55: note: Function 'tre_regncomp' argument 3 names different: declaration 'len' definition 'n'. tre-0.8.0/lib/regexec.c:203:47: style:inconclusive: Function 'tre_regnexec' argument 2 names different: declaration 'string' definition 'str'. [funcArgNamesDifferent] tre-0.8.0/lib/tre.h:165:47: note: Function 'tre_regnexec' argument 2 names different: declaration 'string' definition 'str'. tre-0.8.0/lib/regexec.c:203:47: note: Function 'tre_regnexec' argument 2 names different: declaration 'string' definition 'str'. tre-0.8.0/lib/regexec.c:213:46: style:inconclusive: Function 'tre_regexec' argument 2 names different: declaration 'string' definition 'str'. [funcArgNamesDifferent] tre-0.8.0/lib/tre.h:135:46: note: Function 'tre_regexec' argument 2 names different: declaration 'string' definition 'str'. tre-0.8.0/lib/regexec.c:213:46: note: Function 'tre_regexec' argument 2 names different: declaration 'string' definition 'str'. tre-0.8.0/lib/regexec.c:240:57: style:inconclusive: Function 'tre_reguexec' argument 2 names different: declaration 'string' definition 'str'. [funcArgNamesDifferent] tre-0.8.0/lib/tre.h:241:57: note: Function 'tre_reguexec' argument 2 names different: declaration 'string' definition 'str'. tre-0.8.0/lib/regexec.c:240:57: note: Function 'tre_reguexec' argument 2 names different: declaration 'string' definition 'str'. tre-0.8.0/lib/regexec.c:56:32: style: Parameter 'tags' can be declared as pointer to const [constParameterPointer] tre-0.8.0/lib/regexec.c:60:8: style: Variable 'parents' can be declared as pointer to const [constVariablePointer] tre-0.8.0/lib/regexec.c:128:15: style: Variable 'tnfa' can be declared as pointer to const [constVariablePointer] tre-0.8.0/lib/regexec.c:135:15: style: Variable 'tnfa' can be declared as pointer to const [constVariablePointer] tre-0.8.0/lib/regexec.c:206:15: style: Variable 'tnfa' can be declared as pointer to const [constVariablePointer] tre-0.8.0/lib/regexec.c:243:15: style: Variable 'tnfa' can be declared as pointer to const [constVariablePointer] tre-0.8.0/lib/tre-compile.c:1619:21: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable state [valueFlowBailoutIncompleteVar] tre-0.8.0/lib/tre-compile.c:2288:24: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable TRE_VERSION [valueFlowBailoutIncompleteVar] tre-0.8.0/lib/tre-match-approx.c:406:25: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable cost_ins [valueFlowBailoutIncompleteVar] tre-0.8.0/lib/tre-compile.c:675:18: style: Condition 'status!=REG_OK' is always false [knownConditionTrueFalse] tre-0.8.0/lib/tre-compile.c:672:17: note: Assuming that condition 'status==REG_OK' is not redundant tre-0.8.0/lib/tre-compile.c:675:18: note: Condition 'status!=REG_OK' is always false tre-0.8.0/lib/tre-compile.c:827:18: style: Condition 'status!=REG_OK' is always false [knownConditionTrueFalse] tre-0.8.0/lib/tre-compile.c:822:17: note: Assuming that condition 'status==REG_OK' is not redundant tre-0.8.0/lib/tre-compile.c:827:18: note: Condition 'status!=REG_OK' is always false tre-0.8.0/lib/tre-compile.c:1618:23: style: Condition 'trans->state==NULL' is always true [knownConditionTrueFalse] tre-0.8.0/lib/tre-compile.c:1595:26: note: Assuming that condition 'trans->state!=NULL' is not redundant tre-0.8.0/lib/tre-compile.c:1618:23: note: Condition 'trans->state==NULL' is always true tre-0.8.0/lib/tre-compile.c:597:14: style: Variable 'status' is reassigned a value before the old one has been used. [redundantAssignment] tre-0.8.0/lib/tre-compile.c:595:14: note: status is assigned tre-0.8.0/lib/tre-compile.c:597:14: note: status is overwritten tre-0.8.0/lib/tre-compile.c:270:18: style: Variable 'lit' can be declared as pointer to const [constVariablePointer] tre-0.8.0/lib/tre-compile.c:690:18: style: Variable 'lit' can be declared as pointer to const [constVariablePointer] tre-0.8.0/lib/tre-compile.c:1091:13: style: Parameter 'tags' can be declared as pointer to const [constParameterPointer] tre-0.8.0/lib/tre-compile.c:1572:27: style: Parameter 'offs' can be declared as pointer to const [constParameterPointer] tre-0.8.0/lib/tre-compile.c:1945:13: warning: Size of pointer 'minimal_tags' used instead of size of its data. [pointerSize] tre-0.8.0/lib/tre-compile.c:114:7: style: struct member 'tre_tag_states_t::next_tag' is never used. [unusedStructMember] tre-0.8.0/lib/tre-compile.c:625:19: style: Variable 'minimal_tag' is assigned a value that is never used. [unreadVariable] tre-0.8.0/lib/tre-parse.c:372:42: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable obj [valueFlowBailoutIncompleteVar] tre-0.8.0/lib/tre-parse.c:86:39: style: Array index 'j' is used before limits check. [arrayIndexThenCheck] tre-0.8.0/lib/tre-parse.c:800:13: style: Condition 'r>=ctx->re_end' is always false [knownConditionTrueFalse] tre-0.8.0/lib/tre-parse.c:790:9: note: Assuming that condition 'r>=ctx->re_end' is not redundant tre-0.8.0/lib/tre-parse.c:794:9: note: Assuming condition is false tre-0.8.0/lib/tre-parse.c:800:13: note: Condition 'r>=ctx->re_end' is always false tre-0.8.0/lib/tre-parse.c:164:18: style: Variable 'l_a' can be declared as pointer to const [constVariablePointer] tre-0.8.0/lib/tre-parse.c:164:38: style: Variable 'l_b' can be declared as pointer to const [constVariablePointer] tre-0.8.0/lib/tre-stack.c:63:36: style: Parameter 's' can be declared as pointer to const [constParameterPointer] tre-0.8.0/lib/xmalloc.c:147:17: style: Condition 'item->ptr!=ptr' is always false [knownConditionTrueFalse] tre-0.8.0/lib/xmalloc.c:142:20: note: Assuming that condition 'item->ptr!=ptr' is not redundant tre-0.8.0/lib/xmalloc.c:147:17: note: Condition 'item->ptr!=ptr' is always false tre-0.8.0/python/tre-python.c:172:17: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable Py_None [valueFlowBailoutIncompleteVar] tre-0.8.0/python/tre-python.c:204:23: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PyExc_ValueError [valueFlowBailoutIncompleteVar] tre-0.8.0/python/tre-python.c:349:8: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable regmatch_t [valueFlowBailoutIncompleteVar] tre-0.8.0/python/tre-python.c:476:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable REG_OK [valueFlowBailoutIncompleteVar] tre-0.8.0/src/agrep.c:96:15: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] tre-0.8.0/src/agrep.c:229:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] tre-0.8.0/src/agrep.c:324:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] tre-0.8.0/src/agrep.c:472:20: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable REG_EXTENDED [valueFlowBailoutIncompleteVar] tre-0.8.0/src/agrep.c:265:75: warning:inconclusive: Either the condition 'next_record==NULL' is redundant or there is overflow in pointer subtraction. [nullPointerArithmeticRedundantCheck] tre-0.8.0/src/agrep.c:214:23: note: Assuming that condition 'next_record==NULL' is not redundant tre-0.8.0/src/agrep.c:265:75: note: Null pointer subtraction tre-0.8.0/src/agrep.c:680:16: style: Redundant initialization for 'next_pos'. The initialized value is overwritten before it is read. [redundantInitialization] tre-0.8.0/src/agrep.c:675:22: note: next_pos is initialized tre-0.8.0/src/agrep.c:680:16: note: next_pos is overwritten tre-0.8.0/src/agrep.c:604:6: style: Consecutive return, break, continue, goto or throw statements are unnecessary. [duplicateBreak] tre-0.8.0/src/agrep.c:239:14: style: Variable 'err' can be declared as pointer to const [constVariablePointer] tre-0.8.0/src/agrep.c:729:13: style: Variable 'tmp' can be declared as pointer to const [constVariablePointer] tre-0.8.0/tests/bench.c:98:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] tre-0.8.0/tests/bench.c:111:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] tre-0.8.0/tests/bench.c:158:22: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable optarg [valueFlowBailoutIncompleteVar] tre-0.8.0/tests/bench.c:302:2: style:inconclusive: Found duplicate branches for 'if' and 'else'. [duplicateBranch] tre-0.8.0/tests/bench.c:304:2: note: Found duplicate branches for 'if' and 'else'. tre-0.8.0/tests/bench.c:302:2: note: Found duplicate branches for 'if' and 'else'. tre-0.8.0/tests/bench.c:65:15: style: Parameter 'sample_data' can be declared as pointer to const [constParameterPointer] tre-0.8.0/tests/bench.c:433:13: warning: Char literal compared with pointer 's'. Did you intend to dereference it? [charLiteralWithCharPtrCompare] tre-0.8.0/tests/randtest.c:47:14: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] tre-0.8.0/tests/randtest.c:42:5: warning: Return value of function rand() is not used. [ignoredReturnValue] tre-0.8.0/tests/randtest.c:36:8: style: Variable 'seed' is reassigned a value before the old one has been used. [redundantAssignment] tre-0.8.0/tests/randtest.c:35:8: note: seed is assigned tre-0.8.0/tests/randtest.c:36:8: note: seed is overwritten tre-0.8.0/tests/retest.c:132:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] tre-0.8.0/tests/retest.c:155:9: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable REG_ESPACE [valueFlowBailoutIncompleteVar] tre-0.8.0/tests/retest.c:188:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] tre-0.8.0/tests/retest.c:267:18: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable rm_so [valueFlowBailoutIncompleteVar] tre-0.8.0/tests/retest.c:359:26: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable REG_BACKTRACKING_MATCHER [valueFlowBailoutIncompleteVar] tre-0.8.0/tests/retest.c:402:37: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable REG_APPROX_MATCHER [valueFlowBailoutIncompleteVar] tre-0.8.0/tests/retest.c:565:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable REG_EXTENDED [valueFlowBailoutIncompleteVar] tre-0.8.0/tests/retest.c:273:8: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] tre-0.8.0/tests/retest.c:297:4: warning: %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] tre-0.8.0/tests/retest.c:313:6: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] tre-0.8.0/tests/retest.c:171:7: warning: Possible null pointer dereference: buf [nullPointer] tre-0.8.0/tests/retest.c:140:17: note: Assignment 'buf=NULL', assigned value is 0 tre-0.8.0/tests/retest.c:143:16: note: Assuming condition is true tre-0.8.0/tests/retest.c:171:7: note: Null pointer dereference tre-0.8.0/tests/retest.c:223:38: style: Parameter 'pmatch' can be declared as pointer to const [constParameterPointer] tre-0.8.0/tests/test-str-source.c:116:29: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable REG_EXTENDED [valueFlowBailoutIncompleteVar] tre-0.8.0/tests/test-str-source.c:61:3: portability: %lu in format string (no. 2) requires 'unsigned long' but the argument type is 'size_t {aka unsigned long}'. [invalidPrintfArgType_uint] tre-0.8.0/tests/test-str-source.c:61:3: portability: %lu in format string (no. 4) requires 'unsigned long' but the argument type is 'size_t {aka unsigned long}'. [invalidPrintfArgType_uint] tre-0.8.0/tests/test-str-source.c:60:20: style: Variable 'ctx' can be declared as pointer to const [constVariablePointer] tre-0.8.0/lib/tre-match-approx.c:129:14: style: Parameter 'pa' can be declared as pointer to const [constParameterPointer] tre-0.8.0/lib/tre-match-utils.h:178:50: style: Parameter 'tag_directions' can be declared as pointer to const [constParameterPointer] tre-0.8.0/lib/tre-match-utils.h:179:13: style: Parameter 't1' can be declared as pointer to const [constParameterPointer] tre-0.8.0/lib/tre-match-utils.h:179:22: style: Parameter 't2' can be declared as pointer to const [constParameterPointer] tre-0.8.0/lib/tre-match-backtrack.c:427:49: style:inconclusive: Boolean expression '!(((1<<1)<<1)<<1)' is used in bitwise operation. Did you mean '&&'? [bitwiseOnBoolean] tre-0.8.0/lib/tre-match-backtrack.c:427:49: style: Boolean result is used in bitwise operation. Clarify expression with parentheses. [clarifyCondition] tre-0.8.0/lib/tre-match-backtrack.c:427:49: style: Argument 'tnfa->cflags&!(((1<<1)<<1)<<1)' to function tre_fill_pmatch is always 0. It does not matter what value 'tnfa->cflags' has. [knownArgument] tre-0.8.0/lib/tre-match-backtrack.c:353:11: style: Variable 'tmp' can be declared as pointer to const [constVariablePointer] diff: head tre-0.8.0/lib/tre-compile.c:2288:24: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable TRE_VERSION [valueFlowBailoutIncompleteVar] 2.13.0 tre-0.8.0/lib/tre-match-parallel.c:215:8: style: Condition 'buf' is always true [knownConditionTrueFalse] head tre-0.8.0/python/tre-python.c:204:23: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PyExc_ValueError [valueFlowBailoutIncompleteVar] head tre-0.8.0/python/tre-python.c:349:8: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable regmatch_t [valueFlowBailoutIncompleteVar] head tre-0.8.0/python/tre-python.c:476:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable REG_OK [valueFlowBailoutIncompleteVar] head tre-0.8.0/src/agrep.c:229:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] head tre-0.8.0/src/agrep.c:324:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] head tre-0.8.0/src/agrep.c:472:20: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable REG_EXTENDED [valueFlowBailoutIncompleteVar] head tre-0.8.0/tests/bench.c:111:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] head tre-0.8.0/tests/bench.c:158:22: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable optarg [valueFlowBailoutIncompleteVar] head tre-0.8.0/tests/retest.c:155:9: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable REG_ESPACE [valueFlowBailoutIncompleteVar] head tre-0.8.0/tests/retest.c:188:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] head tre-0.8.0/tests/retest.c:267:18: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable rm_so [valueFlowBailoutIncompleteVar] head tre-0.8.0/tests/retest.c:359:26: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable REG_BACKTRACKING_MATCHER [valueFlowBailoutIncompleteVar] head tre-0.8.0/tests/retest.c:402:37: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable REG_APPROX_MATCHER [valueFlowBailoutIncompleteVar] head tre-0.8.0/tests/retest.c:565:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable REG_EXTENDED [valueFlowBailoutIncompleteVar] DONE