2025-11-21 08:39 ftp://ftp.de.debian.org/debian/pool/main/f/fortune-mod/fortune-mod_1.99.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: 58 55 elapsed-time: 0.6 0.6 head-timing-info: old-timing-info: head results: fortune-mod-1.99.1/util/rot.c:13:31: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable EOF [valueFlowBailoutIncompleteVar] fortune-mod-1.99.1/util/randstr.c:176:24: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable BUFSIZ [valueFlowBailoutIncompleteVar] fortune-mod-1.99.1/util/unstr.c:121:43: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable EOF [valueFlowBailoutIncompleteVar] fortune-mod-1.99.1/util/unstr.c:179:14: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable BUFSIZ [valueFlowBailoutIncompleteVar] fortune-mod-1.99.1/util/unstr.c:221:9: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] fortune-mod-1.99.1/util/randstr.c:222:5: style:inconclusive: Statements following noreturn function 'exit()' will never be executed. [unreachableCode] fortune-mod-1.99.1/util/randstr.c:149:24: style: Parameter 'fp' can be declared as pointer to const [constParameterPointer] fortune-mod-1.99.1/util/randstr.c:164:12: style: Variable 'choice' is assigned a value that is never used. [unreadVariable] fortune-mod-1.99.1/util/unstr.c:174:24: style: Parameter 'tbl' can be declared as pointer to const [constParameterPointer] fortune-mod-1.99.1/util/unstr.c:177:29: style: Variable 'sp' can be declared as pointer to const [constVariablePointer] fortune-mod-1.99.1/util/strfile.c:163:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] fortune-mod-1.99.1/util/strfile.c:177:52: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable EOF [valueFlowBailoutIncompleteVar] fortune-mod-1.99.1/util/strfile.c:242:2: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] fortune-mod-1.99.1/util/strfile.c:340:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable pos [valueFlowBailoutIncompleteVar] fortune-mod-1.99.1/util/strfile.c:479:6: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] fortune-mod-1.99.1/fortune/fortune.c:262:21: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable BUFSIZ [valueFlowBailoutIncompleteVar] fortune-mod-1.99.1/fortune/fortune.c:269:20: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] fortune-mod-1.99.1/fortune/fortune.c:316:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] fortune-mod-1.99.1/fortune/fortune.c:396:17: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] fortune-mod-1.99.1/fortune/fortune.c:486:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] fortune-mod-1.99.1/fortune/fortune.c:596:26: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable O_RDONLY [valueFlowBailoutIncompleteVar] fortune-mod-1.99.1/fortune/fortune.c:774:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LOCFORTDIR [valueFlowBailoutIncompleteVar] fortune-mod-1.99.1/fortune/fortune.c:881:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] fortune-mod-1.99.1/fortune/fortune.c:1018:59: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable EOF [valueFlowBailoutIncompleteVar] fortune-mod-1.99.1/fortune/fortune.c:1136:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] fortune-mod-1.99.1/fortune/fortune.c:1243:30: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable O_RDONLY [valueFlowBailoutIncompleteVar] fortune-mod-1.99.1/fortune/fortune.c:1376:57: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable O_RDONLY [valueFlowBailoutIncompleteVar] fortune-mod-1.99.1/fortune/fortune.c:1455:17: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] fortune-mod-1.99.1/fortune/fortune.c:1610:24: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable BUFSIZ [valueFlowBailoutIncompleteVar] fortune-mod-1.99.1/fortune/fortune.c:1652:24: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable BUFSIZ [valueFlowBailoutIncompleteVar] fortune-mod-1.99.1/fortune/fortune.c:1682:15: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LC_ALL [valueFlowBailoutIncompleteVar] fortune-mod-1.99.1/util/strfile.c:242:2: error: Common realloc mistake: 'Seekpts' nulled but not freed upon failure [memleakOnRealloc] fortune-mod-1.99.1/util/strfile.c:479:6: error: Common realloc mistake: 'Firstch' nulled but not freed upon failure [memleakOnRealloc] fortune-mod-1.99.1/util/strfile.c:341:12: warning: If resource allocation fails, then there is a possible null pointer dereference: Sort_1 [nullPointerOutOfResources] fortune-mod-1.99.1/util/strfile.c:330:19: note: Assuming allocation function fails fortune-mod-1.99.1/util/strfile.c:330:19: note: Assignment 'Sort_1=fopen(Infile,"r")', assigned value is 0 fortune-mod-1.99.1/util/strfile.c:341:12: note: Null pointer dereference fortune-mod-1.99.1/util/strfile.c:342:12: warning: If resource allocation fails, then there is a possible null pointer dereference: Sort_2 [nullPointerOutOfResources] fortune-mod-1.99.1/util/strfile.c:331:19: note: Assuming allocation function fails fortune-mod-1.99.1/util/strfile.c:331:19: note: Assignment 'Sort_2=fopen(Infile,"r")', assigned value is 0 fortune-mod-1.99.1/util/strfile.c:342:12: note: Null pointer dereference fortune-mod-1.99.1/util/strfile.c:478:3: style: 'continue' is redundant since it is the last statement in a loop. [redundantContinue] fortune-mod-1.99.1/util/strfile.c:274:19: style: Variable 'p1' can be declared as pointer to const [constVariablePointer] fortune-mod-1.99.1/util/strfile.c:274:24: style: Variable 'p2' can be declared as pointer to const [constVariablePointer] fortune-mod-1.99.1/util/strfile.c:328:19: style: Variable 'fp' can be declared as pointer to const [constVariablePointer] fortune-mod-1.99.1/util/strfile.c:418:20: style: Variable 'nsp' can be declared as pointer to const [constVariablePointer] fortune-mod-1.99.1/fortune/fortune.c:636:6: warning:inconclusive: The buffer 'llang' may not be null-terminated after the call to strncpy(). [terminateStrncpy] fortune-mod-1.99.1/fortune/fortune.c:825:3: warning:inconclusive: The buffer 'llang' may not be null-terminated after the call to strncpy(). [terminateStrncpy] fortune-mod-1.99.1/fortune/fortune.c:945:4: warning:inconclusive: The buffer 'llang' may not be null-terminated after the call to strncpy(). [terminateStrncpy] fortune-mod-1.99.1/fortune/fortune.c:578:56: warning: If memory allocation fails, then there is a possible null pointer dereference: file [nullPointerOutOfMemory] fortune-mod-1.99.1/fortune/fortune.c:761:15: note: Assuming allocation function fails fortune-mod-1.99.1/fortune/fortune.c:761:15: note: Assignment 'name=strdup(dirent->d_name)', assigned value is 0 fortune-mod-1.99.1/fortune/fortune.c:762:24: note: Calling function 'add_file', 2nd argument 'name' value is 0 fortune-mod-1.99.1/fortune/fortune.c:578:56: note: Null pointer dereference fortune-mod-1.99.1/fortune/fortune.c:579:48: warning: If memory allocation fails, then there is a possible null pointer dereference: file [nullPointerOutOfMemory] fortune-mod-1.99.1/fortune/fortune.c:761:15: note: Assuming allocation function fails fortune-mod-1.99.1/fortune/fortune.c:761:15: note: Assignment 'name=strdup(dirent->d_name)', assigned value is 0 fortune-mod-1.99.1/fortune/fortune.c:762:24: note: Calling function 'add_file', 2nd argument 'name' value is 0 fortune-mod-1.99.1/fortune/fortune.c:579:48: note: Null pointer dereference fortune-mod-1.99.1/fortune/fortune.c:582:10: warning: If memory allocation fails, then there is a possible null pointer dereference: path [nullPointerOutOfMemory] fortune-mod-1.99.1/fortune/fortune.c:761:15: note: Assuming allocation function fails fortune-mod-1.99.1/fortune/fortune.c:761:15: note: Assignment 'name=strdup(dirent->d_name)', assigned value is 0 fortune-mod-1.99.1/fortune/fortune.c:762:24: note: Calling function 'add_file', 2nd argument 'name' value is 0 fortune-mod-1.99.1/fortune/fortune.c:573:9: note: Assignment 'path=file', assigned value is 0 fortune-mod-1.99.1/fortune/fortune.c:582:10: note: Null pointer dereference fortune-mod-1.99.1/fortune/fortune.c:1347:6: style: 'continue' is redundant since it is the last statement in a loop. [redundantContinue] fortune-mod-1.99.1/fortune/fortune.c:814:12: style: Local variable 'lang' shadows outer variable [shadowVariable] fortune-mod-1.99.1/fortune/fortune.c:793:11: note: Shadowed declaration fortune-mod-1.99.1/fortune/fortune.c:814:12: note: Shadow variable fortune-mod-1.99.1/fortune/fortune.c:296:15: style: Variable 'fiddlylist' can be declared as pointer to const [constVariablePointer] fortune-mod-1.99.1/fortune/fortune.c:416:18: style: Parameter 'str' can be declared as pointer to const [constParameterPointer] fortune-mod-1.99.1/fortune/fortune.c:507:20: style: Variable 'sp' can be declared as pointer to const [constVariablePointer] fortune-mod-1.99.1/fortune/fortune.c:509:18: style: Variable 'suflist' can be declared as const array [constVariable] fortune-mod-1.99.1/fortune/fortune.c:559:54: style: Parameter 'dir' can be declared as pointer to const [constParameterPointer] fortune-mod-1.99.1/fortune/fortune.c:743:29: style: Variable 'dirent' can be declared as pointer to const [constVariablePointer] fortune-mod-1.99.1/fortune/fortune.c:792:20: style: Variable 'sp' can be declared as pointer to const [constVariablePointer] fortune-mod-1.99.1/fortune/fortune.c:1203:56: style: Parameter 't2' can be declared as pointer to const [constParameterPointer] fortune-mod-1.99.1/fortune/fortune.c:1676:11: style: Variable 'ctype' can be declared as pointer to const [constVariablePointer] fortune-mod-1.99.1/fortune/fortune.c:822:10: style: Variable 'ret' is assigned a value that is never used. [unreadVariable] diff: head fortune-mod-1.99.1/fortune/fortune.c:296:15: style: Variable 'fiddlylist' can be declared as pointer to const [constVariablePointer] head fortune-mod-1.99.1/fortune/fortune.c:792:20: style: Variable 'sp' can be declared as pointer to const [constVariablePointer] head fortune-mod-1.99.1/util/strfile.c:418:20: style: Variable 'nsp' can be declared as pointer to const [constVariablePointer] DONE