2025-11-21 08:39 ftp://ftp.de.debian.org/debian/pool/main/f/fortunate.app/fortunate.app_3.1.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.12.57+deb13-amd64-x86_64-with-glibc2.41 python: 3.13.5 client-version: 1.3.67 compiler: g++ (Debian 14.2.0-19) 14.2.0 cppcheck: head 2.18.0 head-info: 5374cd3 (2025-11-20 15:35:39 +0100) count: 41 41 elapsed-time: 0.5 0.6 head-timing-info: old-timing-info: head results: fortunate-3.1/fortune/fortune.c:203:19: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LC_ALL [valueFlowBailoutIncompleteVar] fortunate-3.1/fortune/fortune.c:259:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable BUFSIZ [valueFlowBailoutIncompleteVar] fortunate-3.1/fortune/fortune.c:287:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable BUFSIZ [valueFlowBailoutIncompleteVar] fortunate-3.1/fortune/fortune.c:397:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] fortunate-3.1/fortune/fortune.c:437:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] fortunate-3.1/fortune/fortune.c:561:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] fortunate-3.1/fortune/fortune.c:738:18: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] fortunate-3.1/fortune/fortune.c:875:18: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] fortunate-3.1/fortune/fortune.c:922:18: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] fortunate-3.1/fortune/fortune.c:1172:18: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] fortunate-3.1/fortune/fortune.c:1243:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] fortunate-3.1/fortune/fortune.c:1278:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] fortunate-3.1/fortune/fortune.c:1391:48: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] fortunate-3.1/fortune/fortune.c:1402:17: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] fortunate-3.1/fortune/fortune.c:691:12: style: Obsolescent function 'rindex' called. It is recommended to use 'strrchr' instead. [prohibitedrindexCalled] fortunate-3.1/fortune/fortune.c:797:12: style: Obsolescent function 'rindex' called. It is recommended to use 'strrchr' instead. [prohibitedrindexCalled] fortunate-3.1/fortune/fortune.c:809:12: style: Obsolescent function 'rindex' called. It is recommended to use 'strrchr' instead. [prohibitedrindexCalled] fortunate-3.1/fortune/fortune.c:1044:4: style: 'continue' is redundant since it is the last statement in a loop. [redundantContinue] fortunate-3.1/fortune/fortune.c:477:8: style: Parameter 'dir' can be declared as pointer to const [constParameterPointer] fortunate-3.1/fortune/fortune.c:644:7: style: Parameter 'file' can be declared as pointer to const [constParameterPointer] fortunate-3.1/fortune/fortune.c:774:17: style: Variable 'sp' can be declared as pointer to const [constVariablePointer] fortunate-3.1/fortune/fortune.c:776:15: style: Variable 'suflist' can be declared as const array [constVariable] fortunate-3.1/fortune/fortune.c:851:8: style: Parameter 'str' can be declared as pointer to const [constParameterPointer] fortunate-3.1/fortune/fortune.c:1212:24: style: Parameter 't2' can be declared as pointer to const [constParameterPointer] fortunate-3.1/fortune/regexpr.c:960:28: error: Pointer addition with NULL pointer. [nullPointerArithmetic] fortunate-3.1/fortune/regexpr.c:1378:49: note: Calling function 're_match_pattern_2', 4th argument '(char*)NULL' value is 0 fortunate-3.1/fortune/regexpr.c:960:28: note: Null pointer addition fortunate-3.1/fortune/regexpr.c:1246:48: error: If memory allocation fails: pointer addition with NULL pointer. [nullPointerArithmeticOutOfMemory] fortunate-3.1/fortune/regexpr.c:1245:9: note: Assuming allocation function fails fortunate-3.1/fortune/regexpr.c:1244:30: note: Assignment 'failure_stack_start=(struct failure_point*)malloc(4100*sizeof(*failure_stack_start))', assigned value is 0 fortunate-3.1/fortune/regexpr.c:1246:48: note: Null pointer addition fortunate-3.1/fortune/regexpr.c:1249:41: error: If memory allocation fails: pointer addition with NULL pointer. [nullPointerArithmeticOutOfMemory] fortunate-3.1/fortune/regexpr.c:1245:9: note: Assuming allocation function fails fortunate-3.1/fortune/regexpr.c:1244:30: note: Assignment 'failure_stack_start=(struct failure_point*)malloc(4100*sizeof(*failure_stack_start))', assigned value is 0 fortunate-3.1/fortune/regexpr.c:1249:41: note: Null pointer addition fortunate-3.1/fortune/regexpr.c:601:11: style: Checking if unsigned expression 'ch' is less than zero. [unsignedLessThanZero] fortunate-3.1/fortune/regexpr.c:272:7: style: Parameter 'regex' can be declared as pointer to const [constParameterPointer] fortunate-3.1/fortune/regexpr.c:281:19: style: Variable 'translate' can be declared as pointer to const [constVariablePointer] fortunate-3.1/fortune/regexpr.c:916:41: style: Variable 'failure_stack_end' can be declared as pointer to const [constVariablePointer] fortunate-3.1/fortune/regexpr.c:918:16: style: Variable 'translate' can be declared as pointer to const [constVariablePointer] fortunate-3.1/fortune/regexpr.c:918:35: style: Variable 'textend' can be declared as pointer to const [constVariablePointer] fortunate-3.1/fortune/regexpr.c:922:9: style: Variable 'regtext' can be declared as pointer to const [constVariablePointer] fortunate-3.1/fortune/regexpr.c:922:19: style: Variable 'regpartend' can be declared as pointer to const [constVariablePointer] fortunate-3.1/fortune/regexpr.c:1120:17: style: Variable 'p2' can be declared as pointer to const [constVariablePointer] fortunate-3.1/fortune/regexpr.c:1388:9: style: Variable 'fastmap' can be declared as pointer to const [constVariablePointer] fortunate-3.1/fortune/regexpr.c:1388:19: style: Variable 'translate' can be declared as pointer to const [constVariablePointer] fortunate-3.1/fortune/regexpr.c:1388:38: style: Variable 'partstart' can be declared as pointer to const [constVariablePointer] fortunate-3.1/fortune/regexpr.c:1388:50: style: Variable 'partend' can be declared as pointer to const [constVariablePointer] fortunate-3.1/fortune/regexpr.c:816:6: style: Variable 'pos' is assigned a value that is never used. [unreadVariable] diff: DONE