2022-06-23 22:41 ftp://ftp.de.debian.org/debian/pool/main/n/netperfmeter/netperfmeter_1.9.2.orig.tar.xz cppcheck-options: --library=posix --library=gnu --showtime=top5 --check-library --inconclusive --enable=style,information --template=daca2 -D__GNUC__ --platform=unix64 -rp=temp -j1 platform: Linux-5.4.0-121-generic-x86_64-with-glibc2.29 python: 3.8.10 client-version: 1.3.24 compiler: g++ (Ubuntu 10.3.0-1ubuntu1~20.04) 10.3.0 cppcheck: head 2.8 head-info: 60c1eef (2022-06-23 20:26:47 +0200) count: 91 91 elapsed-time: 17.6 18.9 head-timing-info: Tokenizer::simplifyTokens1: 5.50513s (avg. 0.262149s - 21 result(s)) Tokenizer::simplifyTokens1::ValueFlow: 5.10786s (avg. 0.243232s - 21 result(s)) Tokenizer::simplifyTokens1::createSymbolDatabase: 0.196893s (avg. 0.00937586s - 21 result(s)) Tokenizer::createTokens: 0.062671s (avg. 0.00272483s - 23 result(s)) Tokenizer::simplifyTokens1::setValueType: 0.039479s (avg. 0.00187995s - 21 result(s)) Overall time: 11.1146s old-timing-info: Tokenizer::simplifyTokens1: 5.95286s (avg. 0.283469s - 21 result(s)) Tokenizer::simplifyTokens1::ValueFlow: 5.52487s (avg. 0.263089s - 21 result(s)) Tokenizer::simplifyTokens1::createSymbolDatabase: 0.217985s (avg. 0.0103802s - 21 result(s)) Tokenizer::createTokens: 0.059295s (avg. 0.00257804s - 23 result(s)) Tokenizer::simplifyTokens1::setValueType: 0.042664s (avg. 0.00203162s - 21 result(s)) Overall time: 12.0119s head results: netperfmeter-1.9.2/src/messagereader.h:59:18: style:inconclusive: Technically the member function 'MessageReader::size' can be const. [functionConst] netperfmeter-1.9.2/src/flow.h:131:9: style: The function 'run' overrides a function in a base class but is not marked with a 'override' specifier. [missingOverride] netperfmeter-1.9.2/src/thread.h:53:17: note: Virtual function in base class netperfmeter-1.9.2/src/flow.h:131:9: note: Function in derived class netperfmeter-1.9.2/src/flow.h:320:17: style: The function 'run' overrides a function in a base class but is not marked with a 'override' specifier. [missingOverride] netperfmeter-1.9.2/src/thread.h:53:17: note: Virtual function in base class netperfmeter-1.9.2/src/flow.h:320:17: note: Function in derived class netperfmeter-1.9.2/src/control.cc:799:29: style: Condition 'success==true' is always true [knownConditionTrueFalse] netperfmeter-1.9.2/src/control.cc:795:7: note: Assuming that condition 'success' is not redundant netperfmeter-1.9.2/src/control.cc:799:29: note: Condition 'success==true' is always true netperfmeter-1.9.2/src/control.cc:852:38: style: Comparing expression of type 'const unsigned char' against value 255. Condition is always true. [compareValueOutOfTypeRangeError] netperfmeter-1.9.2/src/flow.h:283:67: performance: Function parameter 'extension' should be passed by const reference. [passedByValue] netperfmeter-1.9.2/src/control.cc:210:74: portability: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned] netperfmeter-1.9.2/src/control.cc:871:89: portability: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned] netperfmeter-1.9.2/src/control.cc:872:89: portability: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned] netperfmeter-1.9.2/src/control.cc:210:74: error: Signed integer overflow for expression '1<<31'. [integerOverflow] netperfmeter-1.9.2/src/control.cc:871:89: error: Signed integer overflow for expression '1<<31'. [integerOverflow] netperfmeter-1.9.2/src/control.cc:872:89: error: Signed integer overflow for expression '1<<31'. [integerOverflow] netperfmeter-1.9.2/src/control.cc:217:61: performance: Prefer prefix ++/-- operators for non-primitive types. [postfixOperator] netperfmeter-1.9.2/src/control.cc:382:10: performance: Prefer prefix ++/-- operators for non-primitive types. [postfixOperator] netperfmeter-1.9.2/src/control.cc:626:7: performance: Prefer prefix ++/-- operators for non-primitive types. [postfixOperator] netperfmeter-1.9.2/src/control.cc:1044:7: performance: Prefer prefix ++/-- operators for non-primitive types. [postfixOperator] netperfmeter-1.9.2/src/control.cc:1096:7: performance: Prefer prefix ++/-- operators for non-primitive types. [postfixOperator] netperfmeter-1.9.2/src/cpustatus.cc:82:12: warning: Member variable 'CPUStatus::CPUs' is not initialized in the constructor. [uninitMemberVar] netperfmeter-1.9.2/src/cpustatus.cc:82:12: warning: Member variable 'CPUStatus::CpuStates' is not initialized in the constructor. [uninitMemberVar] netperfmeter-1.9.2/src/cpustatus.cc:130:15: style: C-style pointer casting [cstyleCast] netperfmeter-1.9.2/src/cpustatus.cc:135:18: style: C-style pointer casting [cstyleCast] netperfmeter-1.9.2/src/cpustatus.cc:141:18: style: C-style pointer casting [cstyleCast] netperfmeter-1.9.2/src/createsummary.cc:214:15: style: Obsolescent function 'index' called. It is recommended to use 'strchr' instead. [prohibitedindexCalled] netperfmeter-1.9.2/src/createsummary.cc:265:27: style: Obsolescent function 'rindex' called. It is recommended to use 'strrchr' instead. [prohibitedrindexCalled] netperfmeter-1.9.2/src/createsummary.cc:325:26: style: Obsolescent function 'index' called. It is recommended to use 'strchr' instead. [prohibitedindexCalled] netperfmeter-1.9.2/src/createsummary.cc:110:34: style: C-style pointer casting [cstyleCast] netperfmeter-1.9.2/src/createsummary.cc:118:59: style: C-style pointer casting [cstyleCast] netperfmeter-1.9.2/src/createsummary.cc:136:66: style: C-style pointer casting [cstyleCast] netperfmeter-1.9.2/src/createsummary.cc:137:66: style: C-style pointer casting [cstyleCast] netperfmeter-1.9.2/src/createsummary.cc:415:33: style: C-style pointer casting [cstyleCast] netperfmeter-1.9.2/src/createsummary.cc:416:33: style: C-style pointer casting [cstyleCast] netperfmeter-1.9.2/src/createsummary.cc:417:33: style: C-style pointer casting [cstyleCast] netperfmeter-1.9.2/src/createsummary.cc:418:33: style: C-style pointer casting [cstyleCast] netperfmeter-1.9.2/src/createsummary.cc:419:33: style: C-style pointer casting [cstyleCast] netperfmeter-1.9.2/src/createsummary.cc:421:29: style: C-style pointer casting [cstyleCast] netperfmeter-1.9.2/src/createsummary.cc:1008:29: style: C-style pointer casting [cstyleCast] netperfmeter-1.9.2/src/createsummary.cc:1012:20: style: C-style pointer casting [cstyleCast] netperfmeter-1.9.2/src/createsummary.cc:328:21: style: Local variable 'i' shadows outer variable [shadowVariable] netperfmeter-1.9.2/src/createsummary.cc:287:12: note: Shadowed declaration netperfmeter-1.9.2/src/createsummary.cc:328:21: note: Shadow variable netperfmeter-1.9.2/src/createsummary.cc:126:7: performance: Prefer prefix ++/-- operators for non-primitive types. [postfixOperator] netperfmeter-1.9.2/src/createsummary.cc:781:10: performance: Prefer prefix ++/-- operators for non-primitive types. [postfixOperator] netperfmeter-1.9.2/src/defragmenter.cc:68:43: performance: Prefer prefix ++/-- operators for non-primitive types. [postfixOperator] netperfmeter-1.9.2/src/defragmenter.cc:75:57: performance: Prefer prefix ++/-- operators for non-primitive types. [postfixOperator] netperfmeter-1.9.2/src/defragmenter.cc:163:4: performance: Prefer prefix ++/-- operators for non-primitive types. [postfixOperator] netperfmeter-1.9.2/src/defragmenter.cc:165:7: performance: Prefer prefix ++/-- operators for non-primitive types. [postfixOperator] netperfmeter-1.9.2/src/extractvectors.cc:100:13: warning: %n in format string (no. 5) requires 'int *' but the argument type is 'unsigned int *'. [invalidScanfArgType_int] netperfmeter-1.9.2/src/extractvectors.cc:126:59: performance: Prefer prefix ++/-- operators for non-primitive types. [postfixOperator] netperfmeter-1.9.2/src/flow.cc:83:34: performance: Prefer prefix ++/-- operators for non-primitive types. [postfixOperator] netperfmeter-1.9.2/src/flow.cc:93:34: performance: Prefer prefix ++/-- operators for non-primitive types. [postfixOperator] netperfmeter-1.9.2/src/flow.cc:110:34: performance: Prefer prefix ++/-- operators for non-primitive types. [postfixOperator] netperfmeter-1.9.2/src/flow.cc:127:34: performance: Prefer prefix ++/-- operators for non-primitive types. [postfixOperator] netperfmeter-1.9.2/src/flow.cc:150:34: performance: Prefer prefix ++/-- operators for non-primitive types. [postfixOperator] netperfmeter-1.9.2/src/flow.cc:172:34: performance: Prefer prefix ++/-- operators for non-primitive types. [postfixOperator] netperfmeter-1.9.2/src/flow.cc:206:39: performance: Prefer prefix ++/-- operators for non-primitive types. [postfixOperator] netperfmeter-1.9.2/src/flow.cc:254:36: performance: Prefer prefix ++/-- operators for non-primitive types. [postfixOperator] netperfmeter-1.9.2/src/flow.cc:298:42: performance: Prefer prefix ++/-- operators for non-primitive types. [postfixOperator] netperfmeter-1.9.2/src/flow.cc:397:42: performance: Prefer prefix ++/-- operators for non-primitive types. [postfixOperator] netperfmeter-1.9.2/src/flow.cc:414:42: performance: Prefer prefix ++/-- operators for non-primitive types. [postfixOperator] netperfmeter-1.9.2/src/flow.cc:521:33: performance: Prefer prefix ++/-- operators for non-primitive types. [postfixOperator] netperfmeter-1.9.2/src/flow.cc:666:34: performance: Prefer prefix ++/-- operators for non-primitive types. [postfixOperator] netperfmeter-1.9.2/src/flow.cc:779:50: performance: Prefer prefix ++/-- operators for non-primitive types. [postfixOperator] netperfmeter-1.9.2/src/flow.cc:831:55: performance: Prefer prefix ++/-- operators for non-primitive types. [postfixOperator] netperfmeter-1.9.2/src/flowtrafficspec.cc:28:18: warning: Member variable 'FlowTrafficSpec::Protocol' is not initialized in the constructor. [uninitMemberVar] netperfmeter-1.9.2/src/flowtrafficspec.cc:118:41: performance: Prefer prefix ++/-- operators for non-primitive types. [postfixOperator] netperfmeter-1.9.2/src/inputfile.cc:30:12: warning: Member variable 'InputFile::Format' is not initialized in the constructor. [uninitMemberVar] netperfmeter-1.9.2/src/inputfile.cc:30:12: warning: Member variable 'InputFile::StoragePos' is not initialized in the constructor. [uninitMemberVar] netperfmeter-1.9.2/src/inputfile.cc:30:12: warning: Member variable 'InputFile::Storage' is not initialized in the constructor. [uninitMemberVar] netperfmeter-1.9.2/src/messagereader.cc:212:46: style: C-style pointer casting [cstyleCast] netperfmeter-1.9.2/src/messagereader.cc:97:100: performance: Prefer prefix ++/-- operators for non-primitive types. [postfixOperator] netperfmeter-1.9.2/src/netperfmeter.cc:113:22: style: Obsolescent function 'index' called. It is recommended to use 'strchr' instead. [prohibitedindexCalled] netperfmeter-1.9.2/src/netperfmeter.cc:133:22: style: Obsolescent function 'index' called. It is recommended to use 'strchr' instead. [prohibitedindexCalled] netperfmeter-1.9.2/src/netperfmeter.cc:248:7: warning: %u in format string (no. 1) requires 'unsigned int *' but the argument type is 'signed int *'. [invalidScanfArgType_int] netperfmeter-1.9.2/src/netperfmeter.cc:251:12: warning: %u in format string (no. 1) requires 'unsigned int *' but the argument type is 'signed int *'. [invalidScanfArgType_int] netperfmeter-1.9.2/src/netperfmeter.cc:260:12: warning: %u in format string (no. 1) requires 'unsigned int *' but the argument type is 'signed int *'. [invalidScanfArgType_int] netperfmeter-1.9.2/src/netperfmeter.cc:291:12: warning: %u in format string (no. 1) requires 'unsigned int *' but the argument type is 'signed int *'. [invalidScanfArgType_int] netperfmeter-1.9.2/src/netperfmeter.cc:295:12: warning: %u in format string (no. 1) requires 'unsigned int *' but the argument type is 'signed int *'. [invalidScanfArgType_int] netperfmeter-1.9.2/src/netperfmeter.cc:299:12: warning: %u in format string (no. 1) requires 'unsigned int *' but the argument type is 'signed int *'. [invalidScanfArgType_int] netperfmeter-1.9.2/src/netperfmeter.cc:302:12: warning: %u in format string (no. 1) requires 'unsigned int *' but the argument type is 'signed int *'. [invalidScanfArgType_int] netperfmeter-1.9.2/src/netperfmeter.cc:788:27: style: Unused variable: pollFDIndex [unusedVariable] netperfmeter-1.9.2/src/netperfmeter.cc:437:55: performance: Prefer prefix ++/-- operators for non-primitive types. [postfixOperator] netperfmeter-1.9.2/src/outputfile.cc:31:13: warning: Member variable 'OutputFile::Format' is not initialized in the constructor. [uninitMemberVar] netperfmeter-1.9.2/src/outputfile.cc:179:40: style: C-style pointer casting [cstyleCast] netperfmeter-1.9.2/src/runtimeestimator.cc:97:36: portability: Non reentrant function 'localtime' called. For threadsafe applications it is recommended to use the reentrant replacement function 'localtime_r'. [prohibitedlocaltimeCalled] netperfmeter-1.9.2/src/runtimeestimator.cc:100:7: warning: %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] netperfmeter-1.9.2/src/redblacktree_impl.h:1082:0: error: failed to expand 'CHECK', it is invalid to use a preprocessor directive as macro parameter [preprocessorErrorDirective] netperfmeter-1.9.2/src/thread.cc:102:4: style: Obsolescent function 'usleep' called. It is recommended to use 'nanosleep' or 'setitimer' instead. [prohibitedusleepCalled] netperfmeter-1.9.2/src/thread.cc:35:4: performance: Variable 'MyThread' is assigned in constructor body. Consider performing initialization in initialization list. [useInitializationList] netperfmeter-1.9.2/src/thread.cc:54:21: style: C-style pointer casting [cstyleCast] netperfmeter-1.9.2/src/thread.cc:67:56: style: C-style pointer casting [cstyleCast] netperfmeter-1.9.2/src/tools.cc:658:0: error: #error IPV6_V6ONLY not defined?! Please create a bug report and provide some information about your OS! [preprocessorErrorDirective] netperfmeter-1.9.2/src/transfer.cc:304:61: style:inconclusive: Function 'updateStatistics' argument 1 names different: declaration 'flowSpec' definition 'flow'. [funcArgNamesDifferent] netperfmeter-1.9.2/src/transfer.cc:35:61: note: Function 'updateStatistics' argument 1 names different: declaration 'flowSpec' definition 'flow'. netperfmeter-1.9.2/src/transfer.cc:304:61: note: Function 'updateStatistics' argument 1 names different: declaration 'flowSpec' definition 'flow'. netperfmeter-1.9.2/src/transfer.cc:307:61: style:inconclusive: Function 'updateStatistics' argument 4 names different: declaration 'received' definition 'receivedBytes'. [funcArgNamesDifferent] netperfmeter-1.9.2/src/transfer.cc:38:61: note: Function 'updateStatistics' argument 4 names different: declaration 'received' definition 'receivedBytes'. netperfmeter-1.9.2/src/transfer.cc:307:61: note: Function 'updateStatistics' argument 4 names different: declaration 'received' definition 'receivedBytes'. diff: DONE