2025-11-21 06:31 ftp://ftp.de.debian.org/debian/pool/main/f/flashbench/flashbench_62+git20120606.2e30b19.orig.tar.xz 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-5.4.0-216-generic-x86_64-with-glibc2.29 python: 3.8.10 client-version: 1.3.69 compiler: g++ (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0 cppcheck: head 2.18.0 head-info: 5374cd3 (2025-11-20 15:35:39 +0100) count: 40 45 elapsed-time: 0.3 0.2 head-timing-info: old-timing-info: head results: flashbench-62+git20120606.2e30b19/dev.c:35:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable CLOCK_REALTIME [valueFlowBailoutIncompleteVar] flashbench-62+git20120606.2e30b19/erase.c:14:25: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable O_RDWR [valueFlowBailoutIncompleteVar] flashbench-62+git20120606.2e30b19/dev.c:45:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable ENOMEM [valueFlowBailoutIncompleteVar] flashbench-62+git20120606.2e30b19/dev.c:70:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable ENOMEM [valueFlowBailoutIncompleteVar] flashbench-62+git20120606.2e30b19/dev.c:96:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable ENOMEM [valueFlowBailoutIncompleteVar] flashbench-62+git20120606.2e30b19/dev.c:113:30: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SCHED_FIFO [valueFlowBailoutIncompleteVar] flashbench-62+git20120606.2e30b19/dev.c:125:27: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable O_RDWR [valueFlowBailoutIncompleteVar] flashbench-62+git20120606.2e30b19/erase.c:31:2: warning: %lld in format string (no. 1) requires 'long long' but the argument type is 'unsigned long long'. [invalidPrintfArgType_sint] flashbench-62+git20120606.2e30b19/erase.c:37:2: error: Resource leak: fd [resourceLeak] flashbench-62+git20120606.2e30b19/erase.c:12:26: style: Parameter 'argv' can be declared as const array [constParameter] flashbench-62+git20120606.2e30b19/dev.c:27:53: style: Parameter 'ts' can be declared as pointer to const [constParameterPointer] flashbench-62+git20120606.2e30b19/dev.c:67:17: style: Variable 'p' can be declared as pointer to const [constVariablePointer] flashbench-62+git20120606.2e30b19/vm.c:25:20: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable _p [valueFlowBailoutIncompleteVar] flashbench-62+git20120606.2e30b19/vm.c:59:17: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable O_MAX [valueFlowBailoutIncompleteVar] flashbench-62+git20120606.2e30b19/vm.c:211:30: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable O_LENGTH [valueFlowBailoutIncompleteVar] flashbench-62+git20120606.2e30b19/vm.c:422:28: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable O_END [valueFlowBailoutIncompleteVar] flashbench-62+git20120606.2e30b19/vm.c:502:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] flashbench-62+git20120606.2e30b19/vm.c:617:19: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable A_AVERAGE [valueFlowBailoutIncompleteVar] flashbench-62+git20120606.2e30b19/flashbench.c:206:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] flashbench-62+git20120606.2e30b19/flashbench.c:395:14: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable O_LEN_POW2 [valueFlowBailoutIncompleteVar] flashbench-62+git20120606.2e30b19/flashbench.c:525:14: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable O_SEQUENCE [valueFlowBailoutIncompleteVar] flashbench-62+git20120606.2e30b19/flashbench.c:560:14: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable O_SEQUENCE [valueFlowBailoutIncompleteVar] flashbench-62+git20120606.2e30b19/flashbench.c:657:68: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable optind [valueFlowBailoutIncompleteVar] flashbench-62+git20120606.2e30b19/flashbench.c:785:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] flashbench-62+git20120606.2e30b19/flashbench.c:806:11: style: Condition 'ret<0' is always false [knownConditionTrueFalse] flashbench-62+git20120606.2e30b19/flashbench.c:804:21: note: Calling function 'try_find_fat' returns 0 flashbench-62+git20120606.2e30b19/flashbench.c:804:21: note: Assignment 'ret=try_find_fat(&dev,args.erasesize,args.blocksize,args.fat_nr,args.random)', assigned value is 0 flashbench-62+git20120606.2e30b19/flashbench.c:806:11: note: Condition 'ret<0' is always false flashbench-62+git20120606.2e30b19/flashbench.c:824:11: style: Condition 'ret<0' is always false [knownConditionTrueFalse] flashbench-62+git20120606.2e30b19/flashbench.c:822:20: note: Calling function 'try_open_au' returns 0 flashbench-62+git20120606.2e30b19/flashbench.c:822:20: note: Assignment 'ret=try_open_au(&dev,args.erasesize,args.blocksize,args.open_au_nr,args.offset,args.random)', assigned value is 0 flashbench-62+git20120606.2e30b19/flashbench.c:824:11: note: Condition 'ret<0' is always false flashbench-62+git20120606.2e30b19/flashbench.c:833:11: style: Condition 'ret<0' is always false [knownConditionTrueFalse] flashbench-62+git20120606.2e30b19/flashbench.c:832:22: note: Calling function 'try_intervals' returns 0 flashbench-62+git20120606.2e30b19/flashbench.c:832:22: note: Assignment 'ret=try_intervals(&dev,args.count,args.interval_order)', assigned value is 0 flashbench-62+git20120606.2e30b19/flashbench.c:833:11: note: Condition 'ret<0' is always false flashbench-62+git20120606.2e30b19/flashbench.c:94:41: style: Parameter 'bytes' can be declared as const array [constParameter] flashbench-62+git20120606.2e30b19/flashbench.c:519:10: style: int result is assigned to long long variable. If the variable is long long to avoid loss of information, then you have loss of information. [truncLongCastAssignment] flashbench-62+git20120606.2e30b19/vm.c:123:3: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] flashbench-62+git20120606.2e30b19/vm.c:145:4: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] flashbench-62+git20120606.2e30b19/vm.c:145:4: warning: %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] flashbench-62+git20120606.2e30b19/vm.c:638:3: warning: %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] flashbench-62+git20120606.2e30b19/vm.c:425:13: warning: Either the condition 'next' is redundant or there is pointer arithmetic with NULL pointer. [nullPointerArithmeticRedundantCheck] flashbench-62+git20120606.2e30b19/vm.c:422:6: note: Assuming that condition 'next' is not redundant flashbench-62+git20120606.2e30b19/vm.c:425:13: note: Null pointer addition flashbench-62+git20120606.2e30b19/vm.c:336:9: portability: Casting non-zero decimal integer literal to pointer. [intToPointerCast] flashbench-62+git20120606.2e30b19/vm.c:48:42: style:inconclusive: Function 'call' argument 1 names different: declaration 'program' definition 'op'. [funcArgNamesDifferent] flashbench-62+git20120606.2e30b19/vm.h:96:49: note: Function 'call' argument 1 names different: declaration 'program' definition 'op'. flashbench-62+git20120606.2e30b19/vm.c:48:42: note: Function 'call' argument 1 names different: declaration 'program' definition 'op'. flashbench-62+git20120606.2e30b19/vm.c:162:48: style: Parameter 'op' can be declared as pointer to const. However it seems that 'nop' is a callback function, if 'op' is declared with const you might also need to cast function pointer(s). [constParameterCallback] flashbench-62+git20120606.2e30b19/vm.c:728:26: note: You might need to cast the function pointer here flashbench-62+git20120606.2e30b19/vm.c:162:48: note: Parameter 'op' can be declared as pointer to const flashbench-62+git20120606.2e30b19/vm.c:162:67: style: Parameter 'dev' can be declared as pointer to const. However it seems that 'nop' is a callback function, if 'dev' is declared with const you might also need to cast function pointer(s). [constParameterCallback] flashbench-62+git20120606.2e30b19/vm.c:728:26: note: You might need to cast the function pointer here flashbench-62+git20120606.2e30b19/vm.c:162:67: note: Parameter 'dev' can be declared as pointer to const flashbench-62+git20120606.2e30b19/vm.c:300:76: style: Parameter 'dev' can be declared as pointer to const. However it seems that 'print_string' is a callback function, if 'dev' is declared with const you might also need to cast function pointer(s). [constParameterCallback] flashbench-62+git20120606.2e30b19/vm.c:712:22: note: You might need to cast the function pointer here flashbench-62+git20120606.2e30b19/vm.c:300:76: note: Parameter 'dev' can be declared as pointer to const flashbench-62+git20120606.2e30b19/vm.c:354:71: style: Parameter 'dev' can be declared as pointer to const. However it seems that 'newline' is a callback function, if 'dev' is declared with const you might also need to cast function pointer(s). [constParameterCallback] flashbench-62+git20120606.2e30b19/vm.c:715:26: note: You might need to cast the function pointer here flashbench-62+git20120606.2e30b19/vm.c:354:71: note: Parameter 'dev' can be declared as pointer to const diff: 2.18.0 flashbench-62+git20120606.2e30b19/flashbench.c:131:3: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable __x [valueFlowBailoutIncompleteVar] 2.18.0 flashbench-62+git20120606.2e30b19/flashbench.c:159:2: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable __x [valueFlowBailoutIncompleteVar] 2.18.0 flashbench-62+git20120606.2e30b19/flashbench.c:263:4: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable __x [valueFlowBailoutIncompleteVar] 2.18.0 flashbench-62+git20120606.2e30b19/flashbench.c:303:3: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable __x [valueFlowBailoutIncompleteVar] 2.18.0 flashbench-62+git20120606.2e30b19/flashbench.c:335:3: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable __x [valueFlowBailoutIncompleteVar] 2.18.0 flashbench-62+git20120606.2e30b19/flashbench.c:778:2: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable __x [valueFlowBailoutIncompleteVar] head flashbench-62+git20120606.2e30b19/flashbench.c:785:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] DONE