2025-05-07 19:20 ftp://ftp.de.debian.org/debian/pool/main/r/ries/ries_2018.08.05.orig.tar.xz 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 -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: ebc80c0 (2025-05-07 18:59:31 +0200) count: 72 72 elapsed-time: 6.3 6.6 head-timing-info: old-timing-info: head results: ries-2018.08.05/ries.c:3863:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] ries-2018.08.05/ries.c:4350:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] ries-2018.08.05/ries.c:4440:15: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] ries-2018.08.05/ries.c:4774:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] ries-2018.08.05/ries.c:7621:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] ries-2018.08.05/ries.c:8193:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] ries-2018.08.05/ries.c:9089:17: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] ries-2018.08.05/ries.c:10637:15: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] ries-2018.08.05/ries.c:12455:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] ries-2018.08.05/ries.c:9648:13: warning: Either the condition 'blen>21' is redundant or the array 'next.stk[22]' is accessed at index 22, which is out of bounds. [arrayIndexOutOfBoundsCond] ries-2018.08.05/ries.c:9624:21: note: Assuming that condition 'blen>21' is not redundant ries-2018.08.05/ries.c:9648:13: note: Array index out of bounds ries-2018.08.05/ries.c:9649:14: warning: Either the condition 'blen>21' is redundant or the array 'next.arg1[22]' is accessed at index 22, which is out of bounds. [arrayIndexOutOfBoundsCond] ries-2018.08.05/ries.c:9624:21: note: Assuming that condition 'blen>21' is not redundant ries-2018.08.05/ries.c:9649:14: note: Array index out of bounds ries-2018.08.05/ries.c:9805:16: warning: Either the condition 'sym<10' is redundant or the array 'sym_attrs[256]' is accessed at index 256, which is out of bounds. [arrayIndexOutOfBoundsCond] ries-2018.08.05/ries.c:9799:7: note: Assuming that condition 'sym<10' is not redundant ries-2018.08.05/ries.c:9805:16: note: Array index out of bounds ries-2018.08.05/ries.c:4100:13: style: Array index 'i' is used before limits check. [arrayIndexThenCheck] ries-2018.08.05/ries.c:4124:16: style: Array index 'i' is used before limits check. [arrayIndexThenCheck] ries-2018.08.05/ries.c:4155:16: style: Array index 'i' is used before limits check. [arrayIndexThenCheck] ries-2018.08.05/ries.c:4413:21: style:inconclusive: Redundant condition: The condition '*p' is redundant since '*p > ' '' is sufficient. [redundantCondition] ries-2018.08.05/ries.c:4415:18: style:inconclusive: Redundant condition: The condition '*p' is redundant since '*p > ' '' is sufficient. [redundantCondition] ries-2018.08.05/ries.c:3763:11: style: Condition 'p<0' is always false [knownConditionTrueFalse] ries-2018.08.05/ries.c:3760:9: note: Assuming that condition 'p<0' is not redundant ries-2018.08.05/ries.c:3761:9: note: Assignment 'p=-p', assigned value is greater than 0 ries-2018.08.05/ries.c:3763:11: note: Condition 'p<0' is always false ries-2018.08.05/ries.c:6524:14: style: Condition 'postfix(struct expr,cv_scratch)' is always false [knownConditionTrueFalse] ries-2018.08.05/ries.c:6524:14: note: Calling function 'postfix' returns 0 ries-2018.08.05/ries.c:6524:14: note: Condition 'postfix(struct expr,cv_scratch)' is always false ries-2018.08.05/ries.c:8136:9: style: Condition 'g_enable_output' is always true [knownConditionTrueFalse] ries-2018.08.05/ries.c:11924:13: style: Condition 'flag1==flag2' is always true [knownConditionTrueFalse] ries-2018.08.05/ries.c:11921:11: note: Assignment 'flag1=1==1', assigned value is 1 ries-2018.08.05/ries.c:11924:13: note: Condition 'flag1==flag2' is always true ries-2018.08.05/ries.c:7549:7: warning: %ld in format string (no. 1) requires 'long' but the argument type is 'unsigned long'. [invalidPrintfArgType_sint] ries-2018.08.05/ries.c:4366:7: error: Common realloc mistake: 'base_ptr' nulled but not freed upon failure [memleakOnRealloc] ries-2018.08.05/ries.c:4378:3: error: Common realloc mistake: 'base_ptr' nulled but not freed upon failure [memleakOnRealloc] ries-2018.08.05/ries.c:4360:16: warning: If resource allocation fails, then there is a possible null pointer dereference: in [nullPointerOutOfResources] ries-2018.08.05/ries.c:4332:13: note: Assuming allocation function fails ries-2018.08.05/ries.c:4332:13: note: Assignment 'in=fopen(filename,"rb")', assigned value is 0 ries-2018.08.05/ries.c:4342:9: note: Assuming condition is false ries-2018.08.05/ries.c:4360:16: note: Null pointer dereference ries-2018.08.05/ries.c:10717:7: warning: If memory allocation fails, then there is a possible null pointer dereference: s [nullPointerOutOfMemory] ries-2018.08.05/ries.c:10705:22: note: Assuming allocation function fails ries-2018.08.05/ries.c:10705:7: note: Assignment 's=(char*)malloc(slen+1)', assigned value is 0 ries-2018.08.05/ries.c:10717:7: note: Null pointer dereference ries-2018.08.05/ries.c:10731:11: warning: If memory allocation fails, then there is a possible null pointer dereference: s [nullPointerOutOfMemory] ries-2018.08.05/ries.c:10705:22: note: Assuming allocation function fails ries-2018.08.05/ries.c:10705:7: note: Assignment 's=(char*)malloc(slen+1)', assigned value is 0 ries-2018.08.05/ries.c:10731:11: note: Null pointer dereference ries-2018.08.05/ries.c:11922:13: style: Same expression on both sides of '=='. [duplicateExpression] ries-2018.08.05/ries.c:3772:8: style: Variable 'pow2' is reassigned a value before the old one has been used. [redundantAssignment] ries-2018.08.05/ries.c:3758:8: note: pow2 is assigned ries-2018.08.05/ries.c:3772:8: note: pow2 is overwritten ries-2018.08.05/ries.c:3772:8: style: Variable 'pow2' is reassigned a value before the old one has been used. [redundantAssignment] ries-2018.08.05/ries.c:3767:12: note: pow2 is assigned ries-2018.08.05/ries.c:3772:8: note: pow2 is overwritten ries-2018.08.05/ries.c:10996:24: style: Checking if unsigned expression 'stk_nargs[pa_sp]' is less than zero. [unsignedLessThanZero] ries-2018.08.05/ries.c:11023:31: style: Checking if unsigned expression 'stk_nargs[pa_sp]' is less than zero. [unsignedLessThanZero] ries-2018.08.05/ries.c:11039:31: style: Checking if unsigned expression 'stk_nargs[pa_sp]' is less than zero. [unsignedLessThanZero] ries-2018.08.05/ries.c:6505:35: style:inconclusive: Function 'postfix' argument 2 names different: declaration 'term' definition 'out'. [funcArgNamesDifferent] ries-2018.08.05/ries.c:3561:35: note: Function 'postfix' argument 2 names different: declaration 'term' definition 'out'. ries-2018.08.05/ries.c:6505:35: note: Function 'postfix' argument 2 names different: declaration 'term' definition 'out'. ries-2018.08.05/ries.c:8307:24: style:inconclusive: Function 'bt_first' argument 1 names different: declaration 'tree' definition 'it'. [funcArgNamesDifferent] ries-2018.08.05/ries.c:3589:24: note: Function 'bt_first' argument 1 names different: declaration 'tree' definition 'it'. ries-2018.08.05/ries.c:8307:24: note: Function 'bt_first' argument 1 names different: declaration 'tree' definition 'it'. ries-2018.08.05/ries.c:9532:34: style:inconclusive: Function 'gf_1' argument 2 names different: declaration 'minw' definition 'e_minw'. [funcArgNamesDifferent] ries-2018.08.05/ries.c:3605:34: note: Function 'gf_1' argument 2 names different: declaration 'minw' definition 'e_minw'. ries-2018.08.05/ries.c:9532:34: note: Function 'gf_1' argument 2 names different: declaration 'minw' definition 'e_minw'. ries-2018.08.05/ries.c:9532:46: style:inconclusive: Function 'gf_1' argument 3 names different: declaration 'maxw' definition 'e_maxw'. [funcArgNamesDifferent] ries-2018.08.05/ries.c:3605:44: note: Function 'gf_1' argument 3 names different: declaration 'maxw' definition 'e_maxw'. ries-2018.08.05/ries.c:9532:46: note: Function 'gf_1' argument 3 names different: declaration 'maxw' definition 'e_maxw'. ries-2018.08.05/ries.c:9705:27: style:inconclusive: Function 'gen_forms' argument 1 names different: declaration 'minw' definition 'e_minw'. [funcArgNamesDifferent] ries-2018.08.05/ries.c:3607:27: note: Function 'gen_forms' argument 1 names different: declaration 'minw' definition 'e_minw'. ries-2018.08.05/ries.c:9705:27: note: Function 'gen_forms' argument 1 names different: declaration 'minw' definition 'e_minw'. ries-2018.08.05/ries.c:9705:39: style:inconclusive: Function 'gen_forms' argument 2 names different: declaration 'maxw' definition 'e_maxw'. [funcArgNamesDifferent] ries-2018.08.05/ries.c:3607:37: note: Function 'gen_forms' argument 2 names different: declaration 'maxw' definition 'e_maxw'. ries-2018.08.05/ries.c:9705:39: note: Function 'gen_forms' argument 2 names different: declaration 'maxw' definition 'e_maxw'. ries-2018.08.05/ries.c:9771:10: style:inconclusive: Function 'add_symbol' argument 4 names different: declaration 'type' definition 'seft'. [funcArgNamesDifferent] ries-2018.08.05/ries.c:3614:10: note: Function 'add_symbol' argument 4 names different: declaration 'type' definition 'seft'. ries-2018.08.05/ries.c:9771:10: note: Function 'add_symbol' argument 4 names different: declaration 'type' definition 'seft'. ries-2018.08.05/ries.c:9947:28: style:inconclusive: Function 'add_rule' argument 1 names different: declaration 'symset' definition 'ss'. [funcArgNamesDifferent] ries-2018.08.05/ries.c:3624:28: note: Function 'add_rule' argument 1 names different: declaration 'symset' definition 'ss'. ries-2018.08.05/ries.c:9947:28: note: Function 'add_rule' argument 1 names different: declaration 'symset' definition 'ss'. ries-2018.08.05/ries.c:9947:37: style:inconclusive: Function 'add_rule' argument 2 names different: declaration 'sym' definition 'sy'. [funcArgNamesDifferent] ries-2018.08.05/ries.c:3624:41: note: Function 'add_rule' argument 2 names different: declaration 'sym' definition 'sy'. ries-2018.08.05/ries.c:9947:37: note: Function 'add_rule' argument 2 names different: declaration 'sym' definition 'sy'. ries-2018.08.05/ries.c:7853:17: style: Local variable 'i' shadows outer variable [shadowVariable] ries-2018.08.05/ries.c:7825:7: note: Shadowed declaration ries-2018.08.05/ries.c:7853:17: note: Shadow variable ries-2018.08.05/ries.c:3738:37: style: Parameter 'fr' can be declared as pointer to const [constParameterPointer] ries-2018.08.05/ries.c:6310:12: style: Variable 's' can be declared as pointer to const [constVariablePointer] ries-2018.08.05/ries.c:6348:24: style: Parameter 'a' can be declared as pointer to const [constParameterPointer] ries-2018.08.05/ries.c:6348:36: style: Parameter 'b' can be declared as pointer to const [constParameterPointer] ries-2018.08.05/ries.c:6373:24: style: Parameter 'a' can be declared as pointer to const [constParameterPointer] ries-2018.08.05/ries.c:6373:36: style: Parameter 'b' can be declared as pointer to const [constParameterPointer] ries-2018.08.05/ries.c:6427:37: style: Parameter 'from' can be declared as pointer to const [constParameterPointer] ries-2018.08.05/ries.c:6446:37: style: Parameter 'from' can be declared as pointer to const [constParameterPointer] ries-2018.08.05/ries.c:6480:25: style: Parameter 'input' can be declared as pointer to const [constParameterPointer] ries-2018.08.05/ries.c:6507:12: style: Variable 's' can be declared as pointer to const [constVariablePointer] ries-2018.08.05/ries.c:6558:25: style: Parameter 'expr' can be declared as pointer to const [constParameterPointer] ries-2018.08.05/ries.c:7363:12: style: Variable 'sym' can be declared as pointer to const [constVariablePointer] ries-2018.08.05/ries.c:7828:10: style: Variable 'x_T_intro' can be declared as pointer to const [constVariablePointer] ries-2018.08.05/ries.c:8366:9: style: Variable 'old' can be declared as pointer to const [constVariablePointer] ries-2018.08.05/ries.c:8392:9: style: Variable 'old' can be declared as pointer to const [constVariablePointer] ries-2018.08.05/ries.c:8851:11: style: Variable 'syms' can be declared as pointer to const [constVariablePointer] ries-2018.08.05/ries.c:9748:12: style: Variable 's' can be declared as pointer to const [constVariablePointer] ries-2018.08.05/ries.c:9953:12: style: Variable 's' can be declared as pointer to const [constVariablePointer] ries-2018.08.05/ries.c:10126:28: style: Parameter 's' can be declared as pointer to const [constParameterPointer] ries-2018.08.05/ries.c:10691:24: style: Parameter 'str' can be declared as pointer to const [constParameterPointer] ries-2018.08.05/ries.c:10822:28: style: Parameter 'str' can be declared as pointer to const [constParameterPointer] ries-2018.08.05/ries.c:10952:10: style: Variable 'hd' can be declared as pointer to const [constVariablePointer] ries-2018.08.05/ries.c:11009:10: style: Variable 'p' can be declared as pointer to const [constVariablePointer] ries-2018.08.05/ries.c:11139:16: style: Variable 'filebuf' can be declared as pointer to const [constVariablePointer] ries-2018.08.05/ries.c:11190:16: style: Variable 's' can be declared as pointer to const [constVariablePointer] ries-2018.08.05/ries.c:12067:14: style: Variable 'expr' can be declared as pointer to const [constVariablePointer] ries-2018.08.05/ries.c:4197:21: style: Variable 'length' is assigned a value that is never used. [unreadVariable] ries-2018.08.05/ries.c:7119:44: style: Variable 'prv2' is assigned a value that is never used. [unreadVariable] ries-2018.08.05/ries.c:12070:12: style: Variable 'expr' is assigned a value that is never used. [unreadVariable] diff: DONE