2024-03-26 05:11 ftp://ftp.de.debian.org/debian/pool/main/w/why3/why3_1.6.0.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 -j4 platform: Linux-6.1.0-18-amd64-x86_64-with-glibc2.36 python: 3.11.2 client-version: 1.3.55 compiler: g++ (Debian 12.2.0-14) 12.2.0 cppcheck: head 2.13.0 head-info: 82f05c8 (2024-03-25 22:58:58 +0100) count: 96 79 elapsed-time: 0.7 2.2 head-timing-info: old-timing-info: head results: why3-1.6.0/examples/micro-c/dicho.c:7:15: style: Parameter 'a' can be declared as const array [constParameter] why3-1.6.0/plugins/microc/test.c:10:3: error: Found an exit path from function with non-void return type that has missing return statement [missingReturn] why3-1.6.0/src/jessie/tests/basic/array.c:10:11: style: Parameter 't' can be declared as const array [constParameter] why3-1.6.0/src/jessie/tests/basic/call.c:18:5: style: Variable 'y' is assigned a value that is never used. [unreadVariable] why3-1.6.0/src/jessie/tests/basic/forty-two.c:10:9: style: Variable 'x' is assigned a value that is never used. [unreadVariable] why3-1.6.0/src/jessie/tests/demo/array_max.c:24:14: style: Parameter 'a' can be declared as pointer to const [constParameterPointer] why3-1.6.0/src/jessie/tests/demo/binary_search.c:23:24: style: Parameter 't' can be declared as const array [constParameter] why3-1.6.0/src/jessie/tests/demo/sparse_array.c:105:5: style: Variable 'x' is reassigned a value before the old one has been used. [redundantAssignment] why3-1.6.0/src/jessie/tests/demo/sparse_array.c:102:5: note: x is assigned why3-1.6.0/src/jessie/tests/demo/sparse_array.c:105:5: note: x is overwritten why3-1.6.0/src/jessie/tests/demo/sparse_array.c:105:19: style: Variable 'y' is reassigned a value before the old one has been used. [redundantAssignment] why3-1.6.0/src/jessie/tests/demo/sparse_array.c:102:19: note: y is assigned why3-1.6.0/src/jessie/tests/demo/sparse_array.c:105:19: note: y is overwritten why3-1.6.0/src/jessie/tests/demo/sparse_array.c:107:5: style: Variable 'x' is reassigned a value before the old one has been used. [redundantAssignment] why3-1.6.0/src/jessie/tests/demo/sparse_array.c:105:5: note: x is assigned why3-1.6.0/src/jessie/tests/demo/sparse_array.c:107:5: note: x is overwritten why3-1.6.0/src/jessie/tests/demo/sparse_array.c:107:19: style: Variable 'y' is reassigned a value before the old one has been used. [redundantAssignment] why3-1.6.0/src/jessie/tests/demo/sparse_array.c:105:19: note: y is assigned why3-1.6.0/src/jessie/tests/demo/sparse_array.c:107:19: note: y is overwritten why3-1.6.0/src/jessie/tests/demo/selection_sort.c:89:3: style: Label 'L' is not used. [unusedLabel] why3-1.6.0/src/jessie/tests/demo/sparse_array.c:107:5: style: Variable 'x' is assigned a value that is never used. [unreadVariable] why3-1.6.0/src/jessie/tests/demo/sparse_array.c:107:19: style: Variable 'y' is assigned a value that is never used. [unreadVariable] why3-1.6.0/src/server/arraylist.c:31:26: style: Parameter 'l' can be declared as pointer to const [constParameterPointer] why3-1.6.0/src/server/arraylist.c:35:29: style: Parameter 'l' can be declared as pointer to const [constParameterPointer] why3-1.6.0/src/server/arraylist.c:86:23: style: Parameter 'l' can be declared as pointer to const [constParameterPointer] why3-1.6.0/src/server/cpulimit-unix.c:40:31: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable _SC_CLK_TCK [valueFlowBailoutIncompleteVar] why3-1.6.0/src/server/cpulimit-unix.c:46:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] why3-1.6.0/src/server/cpulimit-unix.c:53:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] why3-1.6.0/src/server/cpulimit-unix.c:85:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable EXIT_FAILURE [valueFlowBailoutIncompleteVar] why3-1.6.0/src/server/logging.c:26:20: style:inconclusive: Function 'log_msg' argument 1 names different: declaration 's' definition 'fmt'. [funcArgNamesDifferent] why3-1.6.0/src/server/logging.h:17:20: note: Function 'log_msg' argument 1 names different: declaration 's' definition 'fmt'. why3-1.6.0/src/server/logging.c:26:20: note: Function 'log_msg' argument 1 names different: declaration 's' definition 'fmt'. why3-1.6.0/src/server/options.c:27:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable required_argument [valueFlowBailoutIncompleteVar] why3-1.6.0/src/server/options.c:25:24: style: Variable 'long_options' can be declared as const array [constVariable] why3-1.6.0/src/server/proc.c:46:25: style:inconclusive: Function 'free_process' argument 1 names different: declaration 'p' definition 'proc'. [funcArgNamesDifferent] why3-1.6.0/src/server/proc.h:38:25: note: Function 'free_process' argument 1 names different: declaration 'p' definition 'proc'. why3-1.6.0/src/server/proc.c:46:25: note: Function 'free_process' argument 1 names different: declaration 'p' definition 'proc'. why3-1.6.0/src/server/proc.c:24:20: style: Parameter 'p' can be declared as pointer to const [constParameterPointer] why3-1.6.0/src/server/proc.c:37:36: style: Parameter 'id' can be declared as pointer to const [constParameterPointer] why3-1.6.0/src/server/queue.c:65:28: style: Parameter 'q' can be declared as pointer to const [constParameterPointer] why3-1.6.0/src/server/queue.c:69:34: style: Parameter 'q' can be declared as pointer to const [constParameterPointer] why3-1.6.0/src/server/cpulimit-unix.c:52:18: style: Parameter 'argv0' can be declared as pointer to const [constParameterPointer] why3-1.6.0/src/server/writebuf.c:55:26: style: Parameter 'b' can be declared as pointer to const [constParameterPointer] why3-1.6.0/src/server/writebuf.c:59:31: style: Parameter 'b' can be declared as pointer to const [constParameterPointer] why3-1.6.0/src/server/server-unix.c:81:44: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable fd [valueFlowBailoutIncompleteVar] why3-1.6.0/src/server/server-unix.c:94:67: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable pollfd [valueFlowBailoutIncompleteVar] why3-1.6.0/src/server/server-unix.c:104:22: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable fd [valueFlowBailoutIncompleteVar] why3-1.6.0/src/server/server-unix.c:114:22: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable fd [valueFlowBailoutIncompleteVar] why3-1.6.0/src/server/server-unix.c:123:22: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable fd [valueFlowBailoutIncompleteVar] why3-1.6.0/src/server/server-unix.c:148:23: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable sockaddr_un [valueFlowBailoutIncompleteVar] why3-1.6.0/src/server/server-unix.c:189:17: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] why3-1.6.0/src/server/server-unix.c:202:27: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable F_GETFL [valueFlowBailoutIncompleteVar] why3-1.6.0/src/server/server-unix.c:231:24: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable sockaddr_un [valueFlowBailoutIncompleteVar] why3-1.6.0/src/server/server-unix.c:253:23: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable O_RDONLY [valueFlowBailoutIncompleteVar] why3-1.6.0/src/server/server-unix.c:309:22: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable POLLOUT [valueFlowBailoutIncompleteVar] why3-1.6.0/src/server/server-unix.c:352:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] why3-1.6.0/src/server/server-unix.c:410:23: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable POLLOUT [valueFlowBailoutIncompleteVar] why3-1.6.0/src/server/server-unix.c:473:26: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable WNOHANG [valueFlowBailoutIncompleteVar] why3-1.6.0/src/server/server-unix.c:645:59: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] why3-1.6.0/src/trywhy3/examples/micro-c/dicho.c:7:15: style: Parameter 'a' can be declared as const array [constParameter] why3-1.6.0/src/server/request.c:33:28: style: Parameter 'buf' can be declared as pointer to const [constParameterPointer] why3-1.6.0/src/server/request.c:43:32: style: Parameter 'buf' can be declared as pointer to const [constParameterPointer] why3-1.6.0/src/server/request.c:130:29: style: Parameter 'r' can be declared as pointer to const [constParameterPointer] why3-1.6.0/src/server/request.c:175:39: style: Parameter 'id' can be declared as pointer to const [constParameterPointer] why3-1.6.0/src/server/request.c:78:11: style: Variable 'pos' is assigned a value that is never used. [unreadVariable] why3-1.6.0/src/server/request.c:89:11: style: Variable 'pos' is assigned a value that is never used. [unreadVariable] why3-1.6.0/src/server/server-unix.c:94:5: error: Common realloc mistake: 'poll_list' nulled but not freed upon failure [memleakOnRealloc] why3-1.6.0/src/server/server-unix.c:427:20: warning: Either the condition 'msgbuf==NULL' is redundant or there is possible null pointer dereference: msgbuf. [nullPointerRedundantCheck] why3-1.6.0/src/server/server-unix.c:423:15: note: Assuming that condition 'msgbuf==NULL' is not redundant why3-1.6.0/src/server/server-unix.c:427:20: note: Null pointer dereference why3-1.6.0/src/server/server-unix.c:454:20: warning: Either the condition 'msgbuf==NULL' is redundant or there is possible null pointer dereference: msgbuf. [nullPointerRedundantCheck] why3-1.6.0/src/server/server-unix.c:451:15: note: Assuming that condition 'msgbuf==NULL' is not redundant why3-1.6.0/src/server/server-unix.c:454:20: note: Null pointer dereference why3-1.6.0/src/server/server-unix.c:646:7: style: 'continue' is redundant since it is the last statement in a loop. [redundantContinue] why3-1.6.0/src/server/server-unix.c:658:11: style: 'continue' is redundant since it is the last statement in a loop. [redundantContinue] why3-1.6.0/src/server/server-unix.c:131:26: style: Parameter 'dir' can be declared as pointer to const [constParameterPointer] why3-1.6.0/src/server/server-unix.c:234:34: style: Parameter 'socketname' can be declared as pointer to const [constParameterPointer] why3-1.6.0/src/server/server-unix.c:238:47: style: Variable 'dirn' can be declared as pointer to const [constVariablePointer] why3-1.6.0/src/server/server-unix.c:238:54: style: Variable 'filen' can be declared as pointer to const [constVariablePointer] why3-1.6.0/src/server/server-unix.c:402:9: style: Variable 'buf' can be declared as pointer to const [constVariablePointer] why3-1.6.0/src/server/server-unix.c:415:11: style: Parameter 'id' can be declared as pointer to const [constParameterPointer] why3-1.6.0/src/server/server-unix.c:435:31: style: Parameter 'id' can be declared as pointer to const [constParameterPointer] why3-1.6.0/src/server/server-unix.c:439:31: style: Parameter 'outfile' can be declared as pointer to const [constParameterPointer] why3-1.6.0/examples/multiprecision/tests.c:144:12: warning: Obsolete function 'alloca' called. In C99 and later it is recommended to use a variable length array instead. [allocaCalled] why3-1.6.0/examples/multiprecision/tests.c:148:23: warning: Obsolete function 'alloca' called. In C99 and later it is recommended to use a variable length array instead. [allocaCalled] why3-1.6.0/examples/multiprecision/tests.c:160:8: warning: Obsolete function 'alloca' called. In C99 and later it is recommended to use a variable length array instead. [allocaCalled] why3-1.6.0/examples/multiprecision/tests.c:310:8: warning: Obsolete function 'alloca' called. In C99 and later it is recommended to use a variable length array instead. [allocaCalled] why3-1.6.0/examples/multiprecision/tests.c:311:8: warning: Obsolete function 'alloca' called. In C99 and later it is recommended to use a variable length array instead. [allocaCalled] why3-1.6.0/examples/multiprecision/tests.c:1297:7: warning: %ld in format string (no. 1) requires 'long' but the argument type is 'unsigned long'. [invalidPrintfArgType_sint] why3-1.6.0/examples/multiprecision/tests.c:1297:7: warning: %ld in format string (no. 2) requires 'long' but the argument type is 'unsigned long'. [invalidPrintfArgType_sint] why3-1.6.0/examples/multiprecision/tests.c:1347:13: warning: %ld in format string (no. 1) requires 'long' but the argument type is 'unsigned long'. [invalidPrintfArgType_sint] why3-1.6.0/examples/multiprecision/tests.c:1347:13: warning: %ld in format string (no. 2) requires 'long' but the argument type is 'unsigned long'. [invalidPrintfArgType_sint] why3-1.6.0/examples/multiprecision/tests.c:1348:13: portability: %lu in format string (no. 4) requires 'unsigned long' but the argument type is 'size_t {aka unsigned long}'. [invalidPrintfArgType_uint] why3-1.6.0/examples/multiprecision/tests.c:285:3: error: Memory leak: __x._mp_d [memleak] why3-1.6.0/examples/multiprecision/tests.c:288:3: error: Memory leak: __x._mp_d [memleak] why3-1.6.0/examples/multiprecision/tests.c:289:3: error: Memory leak: __x._mp_d [memleak] why3-1.6.0/examples/multiprecision/tests.c:302:3: error: Memory leak: __x._mp_d [memleak] why3-1.6.0/examples/multiprecision/tests.c:306:3: error: Memory leak: __x._mp_d [memleak] why3-1.6.0/examples/multiprecision/tests.c:786:15: style: Variable 'elapsed' is reassigned a value before the old one has been used. [redundantAssignment] why3-1.6.0/examples/multiprecision/tests.c:742:19: note: elapsed is assigned why3-1.6.0/examples/multiprecision/tests.c:786:15: note: elapsed is overwritten why3-1.6.0/examples/multiprecision/tests.c:1308:11: style: Variable 'nb_iter' is reassigned a value before the old one has been used. [redundantAssignment] why3-1.6.0/examples/multiprecision/tests.c:1272:11: note: nb_iter is assigned why3-1.6.0/examples/multiprecision/tests.c:1308:11: note: nb_iter is overwritten why3-1.6.0/examples/multiprecision/tests.c:319:2: style: Label 'ret' is not used. [unusedLabel] why3-1.6.0/examples/multiprecision/tests.c:977:2: style: Label 'skip' is not used. [unusedLabel] why3-1.6.0/examples/multiprecision/tests.c:285:3: error: Uninitialized variable: nm1 [uninitvar] why3-1.6.0/examples/multiprecision/tests.c:288:3: error: Uninitialized variable: x [uninitvar] why3-1.6.0/examples/multiprecision/tests.c:289:3: error: Uninitialized variable: y [uninitvar] why3-1.6.0/examples/multiprecision/tests.c:302:3: error: Uninitialized variable: q [uninitvar] why3-1.6.0/examples/multiprecision/tests.c:306:3: error: Uninitialized variable: nm3 [uninitvar] why3-1.6.0/examples/multiprecision/tests.c:120:7: style: Unused variable: cnt [unusedVariable] why3-1.6.0/examples/multiprecision/tests.c:121:23: style: Unused variable: itch [unusedVariable] why3-1.6.0/examples/multiprecision/tests.c:122:9: style: Unused variable: new_b [unusedVariable] why3-1.6.0/examples/multiprecision/tests.c:333:52: style: Unused variable: rep [unusedVariable] why3-1.6.0/examples/multiprecision/tests.c:339:29: style: Unused variable: duration [unusedVariable] diff: head why3-1.6.0/src/server/cpulimit-unix.c:46:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] head why3-1.6.0/src/server/cpulimit-unix.c:53:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] head why3-1.6.0/src/server/cpulimit-unix.c:85:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable EXIT_FAILURE [valueFlowBailoutIncompleteVar] head why3-1.6.0/src/server/server-unix.c:104:22: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable fd [valueFlowBailoutIncompleteVar] head why3-1.6.0/src/server/server-unix.c:114:22: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable fd [valueFlowBailoutIncompleteVar] head why3-1.6.0/src/server/server-unix.c:123:22: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable fd [valueFlowBailoutIncompleteVar] head why3-1.6.0/src/server/server-unix.c:148:23: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable sockaddr_un [valueFlowBailoutIncompleteVar] head why3-1.6.0/src/server/server-unix.c:189:17: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] head why3-1.6.0/src/server/server-unix.c:202:27: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable F_GETFL [valueFlowBailoutIncompleteVar] head why3-1.6.0/src/server/server-unix.c:231:24: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable sockaddr_un [valueFlowBailoutIncompleteVar] head why3-1.6.0/src/server/server-unix.c:253:23: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable O_RDONLY [valueFlowBailoutIncompleteVar] head why3-1.6.0/src/server/server-unix.c:309:22: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable POLLOUT [valueFlowBailoutIncompleteVar] head why3-1.6.0/src/server/server-unix.c:352:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] head why3-1.6.0/src/server/server-unix.c:410:23: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable POLLOUT [valueFlowBailoutIncompleteVar] head why3-1.6.0/src/server/server-unix.c:473:26: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable WNOHANG [valueFlowBailoutIncompleteVar] head why3-1.6.0/src/server/server-unix.c:645:59: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] head why3-1.6.0/src/server/server-unix.c:94:67: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable pollfd [valueFlowBailoutIncompleteVar] DONE