2026-05-01 14:48 ftp://ftp.de.debian.org/debian/pool/main/d/dbench/dbench_4.0.orig.tar.gz cppcheck-options: --library=posix --library=gnu --library=bsd --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 -j1 platform: Linux-6.8.0-111-generic-x86_64-with-glibc2.39 python: 3.12.3 client-version: 1.3.70 compiler: g++ (Ubuntu 14.2.0-4ubuntu2~24.04.1) 14.2.0 cppcheck: head 2.20.0 head-info: e5c4a73 (2026-05-01 11:10:43 +0200) count: 87 86 elapsed-time: 0.8 0.7 head-timing-info: old-timing-info: head results: dbench-4.0/child.c:272:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] dbench-4.0/child.c:227:9: style: Condition 'i>0' is always true [knownConditionTrueFalse] dbench-4.0/child.c:220:9: note: Assuming that condition 'i<2' is not redundant dbench-4.0/child.c:222:7: note: Assuming condition is false dbench-4.0/child.c:227:9: note: Condition 'i>0' is always true dbench-4.0/child.c:182:3: warning: If memory allocation fails, then there is a possible null pointer dereference: sparams [nullPointerOutOfMemory] dbench-4.0/child.c:180:18: note: Assuming allocation function fails dbench-4.0/child.c:180:18: note: Assignment 'sparams=calloc(20,sizeof(char*))', assigned value is 0 dbench-4.0/child.c:182:3: note: Null pointer dereference dbench-4.0/dbench.c:58:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] dbench-4.0/dbench.c:70:20: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable IPC_RMID [valueFlowBailoutIncompleteVar] dbench-4.0/dbench.c:153:9: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] dbench-4.0/dbench.c:253:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] dbench-4.0/dbench.c:387:23: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable POPT_ARG_INT [valueFlowBailoutIncompleteVar] dbench-4.0/dbench.c:472:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] dbench-4.0/dbench.c:321:3: style: Obsolescent function 'usleep' called. It is recommended to use 'nanosleep' or 'setitimer' instead. [prohibitedusleepCalled] dbench-4.0/dbench.c:476:6: style: Condition '!process_opts(argc,argv)' is always false [knownConditionTrueFalse] dbench-4.0/dbench.c:476:19: note: Calling function 'process_opts' returns 1 dbench-4.0/dbench.c:476:6: note: Condition '!process_opts(argc,argv)' is always false dbench-4.0/dbench.c:229:3: warning: %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint] dbench-4.0/dbench.c:229:3: warning: %u in format string (no. 2) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint] dbench-4.0/dbench.c:190:14: style: Variable 'op1' can be declared as pointer to const [constVariablePointer] dbench-4.0/dbench.c:190:20: style: Variable 'op_all' can be declared as pointer to const [constVariablePointer] dbench-4.0/dbench.c:243:8: style: Variable 'load' can be declared as pointer to const [constVariablePointer] dbench-4.0/dbench.c:468:21: style: Variable 'total_bytes' is assigned a value that is never used. [unreadVariable] dbench-4.0/dbench.c:489:15: style: Variable 'total_bytes' is assigned a value that is never used. [unreadVariable] dbench-4.0/dbench.c:493:4: style: Variable 't' is assigned a value that is never used. [unreadVariable] dbench-4.0/fileio.c:62:27: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable O_RDONLY [valueFlowBailoutIncompleteVar] dbench-4.0/fileio.c:213:39: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] dbench-4.0/fileio.c:243:39: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] dbench-4.0/fileio.c:254:14: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable O_RDWR [valueFlowBailoutIncompleteVar] dbench-4.0/fileio.c:361:40: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] dbench-4.0/fileio.c:396:40: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] dbench-4.0/fileio.c:432:42: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] dbench-4.0/fileio.c:546:41: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] dbench-4.0/fileio.c:588:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable F_WRLCK [valueFlowBailoutIncompleteVar] dbench-4.0/fileio.c:607:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable F_UNLCK [valueFlowBailoutIncompleteVar] dbench-4.0/fileio.c:571:2: style: Obsolescent function 'utime' called. It is recommended to use 'utimensat' instead. [prohibitedutimeCalled] dbench-4.0/fileio.c:621:2: style: Obsolescent function 'usleep' called. It is recommended to use 'nanosleep' or 'setitimer' instead. [prohibitedusleepCalled] dbench-4.0/fileio.c:282:21: style: The if condition is the same as the previous if condition [duplicateCondition] dbench-4.0/fileio.c:275:21: note: First condition dbench-4.0/fileio.c:282:21: note: Second condition dbench-4.0/fileio.c:173:10: error: Memory leak: dname [memleak] dbench-4.0/fileio.c:56:19: warning: If memory allocation fails, then there is a possible null pointer dereference: copy_name [nullPointerOutOfMemory] dbench-4.0/fileio.c:55:21: note: Assuming allocation function fails dbench-4.0/fileio.c:55:21: note: Assignment 'copy_name=strdup(fname)', assigned value is 0 dbench-4.0/fileio.c:56:19: note: Null pointer dereference dbench-4.0/fileio.c:62:16: warning: If memory allocation fails, then there is a possible null pointer dereference: copy_name [nullPointerOutOfMemory] dbench-4.0/fileio.c:55:21: note: Assuming allocation function fails dbench-4.0/fileio.c:55:21: note: Assignment 'copy_name=strdup(fname)', assigned value is 0 dbench-4.0/fileio.c:62:16: note: Null pointer dereference dbench-4.0/fileio.c:172:14: warning: If memory allocation fails, then there is a possible null pointer dereference: dname [nullPointerOutOfMemory] dbench-4.0/fileio.c:171:16: note: Assuming allocation function fails dbench-4.0/fileio.c:171:16: note: Assignment 'dname=strdup(name)', assigned value is 0 dbench-4.0/fileio.c:172:14: note: Null pointer dereference dbench-4.0/fileio.c:358:29: warning:inconclusive: If memory allocation fails, then there is a possible null pointer dereference: buf [nullPointerOutOfMemory] dbench-4.0/fileio.c:338:14: note: Assuming allocation function fails dbench-4.0/fileio.c:338:14: note: Assignment 'buf=calloc(size,1)', assigned value is 0 dbench-4.0/fileio.c:358:29: note: Null pointer dereference dbench-4.0/fileio.c:33:17: style: Variable 'ftable' can be declared as pointer to const [constVariablePointer] dbench-4.0/fileio.c:48:46: style: Parameter 'child' can be declared as pointer to const [constParameterPointer] dbench-4.0/fileio.c:111:54: style: Parameter 'child' can be declared as pointer to const [constParameterPointer] dbench-4.0/fileio.c:155:16: style: Variable 'fname' can be declared as pointer to const [constVariablePointer] dbench-4.0/fileio.c:158:17: style: Variable 'd' can be declared as pointer to const [constVariablePointer] dbench-4.0/fileio.c:327:17: style: Variable 'ftable' can be declared as pointer to const [constVariablePointer] dbench-4.0/fileio.c:383:17: style: Variable 'ftable' can be declared as pointer to const [constVariablePointer] dbench-4.0/fileio.c:440:17: style: Variable 'ftable' can be declared as pointer to const [constVariablePointer] dbench-4.0/fileio.c:457:17: style: Variable 'ftable' can be declared as pointer to const [constVariablePointer] dbench-4.0/fileio.c:481:17: style: Variable 'd' can be declared as pointer to const [constVariablePointer] dbench-4.0/fileio.c:520:17: style: Variable 'de' can be declared as pointer to const [constVariablePointer] dbench-4.0/fileio.c:556:17: style: Variable 'ftable' can be declared as pointer to const [constVariablePointer] dbench-4.0/io.c:41:38: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] dbench-4.0/io.c:58:14: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable O_RDWR [valueFlowBailoutIncompleteVar] dbench-4.0/io.c:116:63: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] dbench-4.0/io.c:168:26: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] dbench-4.0/io.c:179:29: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] dbench-4.0/io.c:192:44: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] dbench-4.0/snprintf.c:419:19: style: Condition 'maxlen>0' is always true [knownConditionTrueFalse] dbench-4.0/snprintf.c:416:13: note: Assuming that condition 'maxlen!=0' is not redundant dbench-4.0/snprintf.c:419:19: note: Condition 'maxlen>0' is always true dbench-4.0/snprintf.c:692:5: style: Condition 'caps' is always false [knownConditionTrueFalse] dbench-4.0/snprintf.c:628:13: note: Assignment 'caps=0', assigned value is 0 dbench-4.0/snprintf.c:692:5: note: Condition 'caps' is always false dbench-4.0/snprintf.c:404:7: style: Variable 'ch' is reassigned a value before the old one has been used. [redundantAssignment] dbench-4.0/snprintf.c:398:8: note: ch is assigned dbench-4.0/snprintf.c:404:7: note: ch is overwritten dbench-4.0/snprintf.c:177:2: error: va_list 'args' used before va_start() was called. [va_list_usedBeforeStarted] dbench-4.0/snprintf.c:814:2: error: va_list 'ap2' used before va_start() was called. [va_list_usedBeforeStarted] dbench-4.0/snprintf.c:816:35: error: va_list 'ap2' used before va_start() was called. [va_list_usedBeforeStarted] dbench-4.0/sockio.c:53:63: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable MSG_TRUNC [valueFlowBailoutIncompleteVar] dbench-4.0/sockio.c:249:2: style: Obsolescent function 'usleep' called. It is recommended to use 'nanosleep' or 'setitimer' instead. [prohibitedusleepCalled] dbench-4.0/sockio.c:74:2: warning: If memory allocation fails, then there is a possible null pointer dereference: sockio [nullPointerOutOfMemory] dbench-4.0/sockio.c:69:17: note: Assuming allocation function fails dbench-4.0/sockio.c:69:17: note: Assignment 'sockio=calloc(1,sizeof(struct sockio))', assigned value is 0 dbench-4.0/sockio.c:74:2: note: Null pointer dereference dbench-4.0/sockio.c:75:6: warning: If memory allocation fails, then there is a possible null pointer dereference: sockio [nullPointerOutOfMemory] dbench-4.0/sockio.c:69:17: note: Assuming allocation function fails dbench-4.0/sockio.c:69:17: note: Assignment 'sockio=calloc(1,sizeof(struct sockio))', assigned value is 0 dbench-4.0/sockio.c:75:6: note: Null pointer dereference dbench-4.0/sockio.c:79:21: warning: If memory allocation fails, then there is a possible null pointer dereference: sockio [nullPointerOutOfMemory] dbench-4.0/sockio.c:69:17: note: Assuming allocation function fails dbench-4.0/sockio.c:69:17: note: Assignment 'sockio=calloc(1,sizeof(struct sockio))', assigned value is 0 dbench-4.0/sockio.c:75:19: note: Assuming condition is false dbench-4.0/sockio.c:79:21: note: Null pointer dereference dbench-4.0/socklib.c:32:20: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable AF_INET [valueFlowBailoutIncompleteVar] dbench-4.0/socklib.c:56:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SOCK_STREAM [valueFlowBailoutIncompleteVar] dbench-4.0/socklib.c:161:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] dbench-4.0/socklib.c:66:7: style: Obsolescent function 'gethostbyname' called. It is recommended to use 'getaddrinfo' instead. [prohibitedgethostbynameCalled] dbench-4.0/socklib.c:43:3: error: Resource leak: res [resourceLeak] dbench-4.0/socklib.c:69:3: error: Resource leak: res [resourceLeak] dbench-4.0/socklib.c:59:18: style: Variable 'hp' can be declared as pointer to const [constVariablePointer] dbench-4.0/system.c:50:2: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] dbench-4.0/system.c:77:2: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] dbench-4.0/system.c:111:2: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] dbench-4.0/system.c:28:65: style: Parameter 'value' can be declared as pointer to const [constParameterPointer] dbench-4.0/system.c:55:61: style: Parameter 'value' can be declared as pointer to const [constParameterPointer] dbench-4.0/tbench_srv.c:31:18: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SIG_IGN [valueFlowBailoutIncompleteVar] dbench-4.0/tbench_srv.c:55:24: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SOCK_STREAM [valueFlowBailoutIncompleteVar] dbench-4.0/tbench_srv.c:99:26: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable optarg [valueFlowBailoutIncompleteVar] dbench-4.0/tbench_srv.c:37:13: warning: Uninitialized variable: ibuf [uninitvar] dbench-4.0/tbench_srv.c:28:19: note: Assignment 'ibuf=(unsigned int*)buf', assigned value is dbench-4.0/tbench_srv.c:36:29: note: Assuming condition is false dbench-4.0/tbench_srv.c:37:13: note: Uninitialized variable: ibuf dbench-4.0/util.c:44:17: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable IPC_PRIVATE [valueFlowBailoutIncompleteVar] dbench-4.0/util.c:102:45: style: Parameter 'sep' can be declared as pointer to const [constParameterPointer] dbench-4.0/util.c:150:40: style: Parameter 'tv' can be declared as pointer to const [constParameterPointer] dbench-4.0/util.c:160:41: style: Parameter 'tv1' can be declared as pointer to const [constParameterPointer] dbench-4.0/util.c:160:62: style: Parameter 'tv2' can be declared as pointer to const [constParameterPointer] diff: head dbench-4.0/tbench_srv.c:37:13: warning: Uninitialized variable: ibuf [uninitvar] dbench-4.0/tbench_srv.c:28:19: note: Assignment 'ibuf=(unsigned int*)buf', assigned value is dbench-4.0/tbench_srv.c:36:29: note: Assuming condition is false dbench-4.0/tbench_srv.c:37:13: note: Uninitialized variable: ibuf DONE