2024-04-24 06:24 ftp://ftp.de.debian.org/debian/pool/main/d/dadadodo/dadadodo_1.04.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 -D__GNUC__ --platform=unix64 -j1 platform: Linux-5.15.0-105-generic-x86_64-with-glibc2.35 python: 3.10.12 client-version: 1.3.56 compiler: g++ (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0 cppcheck: head 2.14.0 head-info: 7dab204 (2024-04-23 22:20:29 +0200) count: 31 31 elapsed-time: 36.9 37.5 head-timing-info: old-timing-info: head results: dadadodo-1.04/dadadodo.c:235:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] dadadodo-1.04/dadadodo.c:770:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] dadadodo-1.04/dadadodo.c:880:15: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] dadadodo-1.04/dadadodo.c:1073:23: portability: Non reentrant function 'strtok' called. For threadsafe applications it is recommended to use the reentrant replacement function 'strtok_r'. [prohibitedstrtokCalled] dadadodo-1.04/dadadodo.c:1080:16: portability: Non reentrant function 'strtok' called. For threadsafe applications it is recommended to use the reentrant replacement function 'strtok_r'. [prohibitedstrtokCalled] dadadodo-1.04/dadadodo.c:1135:8: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] dadadodo-1.04/dadadodo.c:1060:8: style: Local variable 'i' shadows outer variable [shadowVariable] dadadodo-1.04/dadadodo.c:802:7: note: Shadowed declaration dadadodo-1.04/dadadodo.c:1060:8: note: Shadow variable dadadodo-1.04/dadadodo.c:1125:9: style: Local variable 'i' shadows outer variable [shadowVariable] dadadodo-1.04/dadadodo.c:802:7: note: Shadowed declaration dadadodo-1.04/dadadodo.c:1125:9: note: Shadow variable dadadodo-1.04/dadadodo.c:1176:9: style: Local variable 'i' shadows outer variable [shadowVariable] dadadodo-1.04/dadadodo.c:802:7: note: Shadowed declaration dadadodo-1.04/dadadodo.c:1176:9: note: Shadow variable dadadodo-1.04/dadadodo.c:808:9: style: Variable 'output' can be declared as pointer to const [constVariablePointer] dadadodo-1.04/dadadodo.c:809:9: style: Variable 'load' can be declared as pointer to const [constVariablePointer] dadadodo-1.04/dadadodo.c:900:19: style: Variable 's' can be declared as pointer to const [constVariablePointer] dadadodo-1.04/dadadodo.c:961:10: style: Variable 'tmp' can be declared as pointer to const [constVariablePointer] dadadodo-1.04/dadadodo.c:1073:19: style: Variable 's' can be declared as pointer to const [constVariablePointer] dadadodo-1.04/files.c:94:14: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] dadadodo-1.04/files.c:303:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] dadadodo-1.04/files.c:184:16: style: Variable 'write_fn' is reassigned a value before the old one has been used. [redundantAssignment] dadadodo-1.04/files.c:91:38: note: write_fn is assigned dadadodo-1.04/files.c:184:16: note: write_fn is overwritten dadadodo-1.04/files.c:364:22: style: Local variable 's' shadows outer variable [shadowVariable] dadadodo-1.04/files.c:283:18: note: Shadowed declaration dadadodo-1.04/files.c:364:22: note: Shadow variable dadadodo-1.04/files.c:464:10: style: Local variable 's' shadows outer variable [shadowVariable] dadadodo-1.04/files.c:283:18: note: Shadowed declaration dadadodo-1.04/files.c:464:10: note: Shadow variable dadadodo-1.04/files.c:236:15: style: Variable 'w' can be declared as pointer to const [constVariablePointer] dadadodo-1.04/files.c:283:18: style: Variable 's' can be declared as pointer to const [constVariablePointer] dadadodo-1.04/files.c:364:26: style: Variable 's2' can be declared as pointer to const [constVariablePointer] dadadodo-1.04/generate.c:57:11: error: Division by zero. [zerodiv] dadadodo-1.04/generate.c:52:15: note: Assignment 'count=0', assigned value is 0 dadadodo-1.04/generate.c:55:17: note: Assuming condition is false dadadodo-1.04/generate.c:57:11: note: Division by zero dadadodo-1.04/generate.c:327:50: style:inconclusive: Function 'string_stats' argument 2 names different: declaration 'word' definition 's'. [funcArgNamesDifferent] dadadodo-1.04/generate.h:21:62: note: Function 'string_stats' argument 2 names different: declaration 'word' definition 's'. dadadodo-1.04/generate.c:327:50: note: Function 'string_stats' argument 2 names different: declaration 'word' definition 's'. dadadodo-1.04/generate.c:93:9: style: Variable 'word' can be declared as pointer to const [constVariablePointer] dadadodo-1.04/generate.c:293:33: style: Parameter 'word' can be declared as pointer to const [constParameterPointer] dadadodo-1.04/generate.c:277:18: style: Variable 'close_paren_p' is assigned a value that is never used. [unreadVariable] dadadodo-1.04/hash.c:163:52: style:inconclusive: Function 'gethash' argument 3 names different: declaration 'default_value' definition 'def'. [funcArgNamesDifferent] dadadodo-1.04/hash.h:25:58: note: Function 'gethash' argument 3 names different: declaration 'default_value' definition 'def'. dadadodo-1.04/hash.c:163:52: note: Function 'gethash' argument 3 names different: declaration 'default_value' definition 'def'. dadadodo-1.04/hash.c:210:35: style:inconclusive: Function 'string_hash' argument 1 names different: declaration 'string' definition 'x'. [funcArgNamesDifferent] dadadodo-1.04/hash.h:31:49: note: Function 'string_hash' argument 1 names different: declaration 'string' definition 'x'. dadadodo-1.04/hash.c:210:35: note: Function 'string_hash' argument 1 names different: declaration 'string' definition 'x'. dadadodo-1.04/hash.c:224:40: style:inconclusive: Function 'string_case_hash' argument 1 names different: declaration 'string' definition 'x'. [funcArgNamesDifferent] dadadodo-1.04/hash.h:32:54: note: Function 'string_case_hash' argument 1 names different: declaration 'string' definition 'x'. dadadodo-1.04/hash.c:224:40: note: Function 'string_case_hash' argument 1 names different: declaration 'string' definition 'x'. dadadodo-1.04/parse.c:141:9: style: Condition 's<0' is always false [knownConditionTrueFalse] dadadodo-1.04/parse.c:140:21: note: Calling function 'increment' returns 0 dadadodo-1.04/parse.c:140:21: note: Assignment 's=increment(next,&prev->succ,&prev->succ_length,&prev->succ_size)', assigned value is 0 dadadodo-1.04/parse.c:141:9: note: Condition 's<0' is always false diff: DONE