2022-06-30 18:28 ftp://ftp.de.debian.org/debian/pool/main/r/ruby-bdb/ruby-bdb_0.6.6.orig.tar.gz 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-110-generic-x86_64-with-glibc2.29 python: 3.8.10 client-version: 1.3.24 compiler: g++ (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0 cppcheck: head 2.8 head-info: 27578e9 (2022-06-30 13:50:31 +0200) count: 101 98 elapsed-time: 3.7 4.4 head-timing-info: Tokenizer::simplifyTokens1: 3.11112s (avg. 0.239317s - 13 result(s)) Tokenizer::simplifyTokens1::ValueFlow: 2.53457s (avg. 0.194967s - 13 result(s)) Tokenizer::simplifyTokens1::createSymbolDatabase: 0.282909s (avg. 0.0217622s - 13 result(s)) Check function usage::runChecks: 0.115818s (avg. 0.00890908s - 13 result(s)) Tokenizer::createTokens: 0.082353s (avg. 0.00633485s - 13 result(s)) Overall time: 6.57264s old-timing-info: Tokenizer::simplifyTokens1: 3.78721s (avg. 0.291324s - 13 result(s)) Tokenizer::simplifyTokens1::ValueFlow: 3.14797s (avg. 0.242151s - 13 result(s)) Tokenizer::simplifyTokens1::createSymbolDatabase: 0.326392s (avg. 0.0251071s - 13 result(s)) Check function usage::runChecks: 0.121699s (avg. 0.00936146s - 13 result(s)) Tokenizer::createTokens: 0.083909s (avg. 0.00645454s - 13 result(s)) Overall time: 7.92591s head results: ruby-bdb-0.6.6/bdbxml1/bdbxml.cc:975:18: style: C-style pointer casting [cstyleCast] ruby-bdb-0.6.6/bdbxml1/bdbxml.cc:1118:5: style: C-style pointer casting [cstyleCast] ruby-bdb-0.6.6/bdbxml1/bdbxml.cc:1288:5: style: C-style pointer casting [cstyleCast] ruby-bdb-0.6.6/bdbxml1/bdbxml.cc:1304:5: style: C-style pointer casting [cstyleCast] ruby-bdb-0.6.6/bdbxml1/bdbxml.cc:1505:5: style: C-style pointer casting [cstyleCast] ruby-bdb-0.6.6/bdbxml1/bdbxml.cc:1520:5: style: C-style pointer casting [cstyleCast] ruby-bdb-0.6.6/bdbxml1/bdbxml.cc:1549:5: style: C-style pointer casting [cstyleCast] ruby-bdb-0.6.6/bdbxml1/bdbxml.cc:1585:5: style: C-style pointer casting [cstyleCast] ruby-bdb-0.6.6/bdbxml1/bdbxml.cc:1676:5: style: C-style pointer casting [cstyleCast] ruby-bdb-0.6.6/bdbxml1/bdbxml.cc:1779:5: style: C-style pointer casting [cstyleCast] ruby-bdb-0.6.6/bdbxml1/bdbxml.cc:1833:5: style: C-style pointer casting [cstyleCast] ruby-bdb-0.6.6/bdbxml1/bdbxml.cc:1855:5: style: C-style pointer casting [cstyleCast] ruby-bdb-0.6.6/bdbxml1/bdbxml.cc:1870:5: style: C-style pointer casting [cstyleCast] ruby-bdb-0.6.6/bdbxml1/bdbxml.cc:1888:5: style: C-style pointer casting [cstyleCast] ruby-bdb-0.6.6/bdbxml1/bdbxml.cc:1914:5: style: C-style pointer casting [cstyleCast] ruby-bdb-0.6.6/bdbxml1/bdbxml.cc:1931:5: style: C-style pointer casting [cstyleCast] ruby-bdb-0.6.6/bdbxml1/bdbxml.cc:1948:5: style: C-style pointer casting [cstyleCast] ruby-bdb-0.6.6/bdbxml1/bdbxml.cc:1990:5: style: C-style pointer casting [cstyleCast] ruby-bdb-0.6.6/bdbxml1/bdbxml.cc:1180:9: style: The scope of the variable 'flags' can be reduced. [variableScope] ruby-bdb-0.6.6/bdbxml1/bdbxml.cc:1320:11: style: The scope of the variable 'as' can be reduced. [variableScope] ruby-bdb-0.6.6/bdbxml1/bdbxml.cc:1364:11: style: The scope of the variable 'as' can be reduced. [variableScope] ruby-bdb-0.6.6/bdbxml1/bdbxml.cc:1388:11: style: The scope of the variable 'as' can be reduced. [variableScope] ruby-bdb-0.6.6/bdbxml1/bdbxml.cc:1606:12: style: The scope of the variable 'envst' can be reduced. [variableScope] ruby-bdb-0.6.6/bdbxml1/bdbxml.cc:1607:10: style: The scope of the variable 'envcc' can be reduced. [variableScope] ruby-bdb-0.6.6/bdbxml1/bdbxml.cc:1669:11: style: The scope of the variable 'str' can be reduced. [variableScope] ruby-bdb-0.6.6/bdbxml1/bdbxml.cc:920:11: style: struct member 'xb_eiv::con' is never used. [unusedStructMember] ruby-bdb-0.6.6/bdbxml1/bdbxml.cc:1990:5: style: Variable 'txn' is assigned a value that is never used. [unreadVariable] ruby-bdb-0.6.6/bdbxml2/bdbxml.cc:94:9: warning: Member variable 'xbRead::buff_' is not initialized in the constructor. [uninitMemberVar] ruby-bdb-0.6.6/bdbxml2/bdbxml.cc:126:5: style: Class 'xbInput' has a constructor with 1 argument that is not explicit. [noExplicitConstructor] ruby-bdb-0.6.6/bdbxml2/bdbxml.cc:317:31: style: C-style pointer casting [cstyleCast] ruby-bdb-0.6.6/bdbxml2/bdbxml.cc:446:20: style: C-style pointer casting [cstyleCast] ruby-bdb-0.6.6/bdbxml2/bdbxml.cc:547:23: style: C-style pointer casting [cstyleCast] ruby-bdb-0.6.6/bdbxml2/bdbxml.cc:553:18: style: C-style pointer casting [cstyleCast] ruby-bdb-0.6.6/bdbxml2/bdbxml.cc:556:26: style: C-style pointer casting [cstyleCast] ruby-bdb-0.6.6/bdbxml2/bdbxml.cc:781:57: style: C-style pointer casting [cstyleCast] ruby-bdb-0.6.6/bdbxml2/bdbxml.cc:809:27: style: C-style pointer casting [cstyleCast] ruby-bdb-0.6.6/bdbxml2/bdbxml.cc:810:27: style: C-style pointer casting [cstyleCast] ruby-bdb-0.6.6/bdbxml2/bdbxml.cc:979:18: style: C-style pointer casting [cstyleCast] ruby-bdb-0.6.6/bdbxml2/bdbxml.cc:1835:44: style: C-style pointer casting [cstyleCast] ruby-bdb-0.6.6/bdbxml2/bdbxml.cc:3113:8: style: C-style pointer casting [cstyleCast] ruby-bdb-0.6.6/bdbxml2/bdbxml.cc:4037:18: style: C-style pointer casting [cstyleCast] ruby-bdb-0.6.6/bdbxml2/bdbxml.cc:4072:44: style: C-style pointer casting [cstyleCast] ruby-bdb-0.6.6/bdbxml2/bdbxml.cc:361:9: style: The scope of the variable 'i' can be reduced. [variableScope] ruby-bdb-0.6.6/src/common.c:2593:5: warning: Operator '|' with one operand equal to zero is redundant. [badBitmaskCheck] ruby-bdb-0.6.6/src/common.c:2631:9: warning: Operator '|' with one operand equal to zero is redundant. [badBitmaskCheck] ruby-bdb-0.6.6/src/common.c:609:11: style: Local variable 'options' shadows outer variable [shadowVariable] ruby-bdb-0.6.6/src/common.c:4488:1: note: Shadowed declaration ruby-bdb-0.6.6/src/common.c:609:11: note: Shadow variable ruby-bdb-0.6.6/src/common.c:404:20: style: Parameter 'dbbd' can be declared as pointer to const [constParameter] ruby-bdb-0.6.6/src/common.c:432:19: style: Parameter 'dbbd' can be declared as pointer to const [constParameter] ruby-bdb-0.6.6/src/common.c:487:16: style: Parameter 'dbbd' can be declared as pointer to const [constParameter] ruby-bdb-0.6.6/src/common.c:978:24: style: Parameter 'dbst' can be declared as pointer to const [constParameter] ruby-bdb-0.6.6/src/common.c:917:13: style: struct member 'bdb_eiv::dbst' is never used. [unusedStructMember] ruby-bdb-0.6.6/src/common.c:1221:18: style: Variable 'envp' is assigned a value that is never used. [unreadVariable] ruby-bdb-0.6.6/src/common.c:1240:11: style: Variable 'envp' is assigned a value that is never used. [unreadVariable] ruby-bdb-0.6.6/src/common.c:1250:11: style: Variable 'envp' is assigned a value that is never used. [unreadVariable] ruby-bdb-0.6.6/src/common.c:1606:13: style: Variable 'count' is assigned a value that is never used. [unreadVariable] ruby-bdb-0.6.6/src/common.c:1866:5: style: Variable 'txnid' is assigned a value that is never used. [unreadVariable] ruby-bdb-0.6.6/src/common.c:2046:9: style: Variable 'flagss' is assigned a value that is never used. [unreadVariable] ruby-bdb-0.6.6/src/common.c:2736:10: style: Variable 'res' is assigned a value that is never used. [unreadVariable] ruby-bdb-0.6.6/src/common.c:3003:15: style: Variable 'flags' is assigned a value that is never used. [unreadVariable] ruby-bdb-0.6.6/src/common.c:3009:12: style: Variable 'flags' is assigned a value that is never used. [unreadVariable] ruby-bdb-0.6.6/src/common.c:4353:15: style: Unused variable: value [unusedVariable] ruby-bdb-0.6.6/src/cursor.c:29:11: style: Variable 'flags' is assigned a value that is never used. [unreadVariable] ruby-bdb-0.6.6/src/cursor.c:34:12: style: Variable 'flags' is assigned a value that is never used. [unreadVariable] ruby-bdb-0.6.6/src/cursor.c:39:8: style: Variable 'flags' is assigned a value that is never used. [unreadVariable] ruby-bdb-0.6.6/src/env.c:513:11: style: Local variable 'options' shadows outer variable [shadowVariable] ruby-bdb-0.6.6/src/env.c:2001:1: note: Shadowed declaration ruby-bdb-0.6.6/src/env.c:513:11: note: Shadow variable ruby-bdb-0.6.6/src/env.c:1327:11: style: Local variable 'options' shadows outer variable [shadowVariable] ruby-bdb-0.6.6/src/env.c:2001:1: note: Shadowed declaration ruby-bdb-0.6.6/src/env.c:1327:11: note: Shadow variable ruby-bdb-0.6.6/src/env.c:49:17: style: struct member 'db_stoptions::lg_bsize' is never used. [unusedStructMember] ruby-bdb-0.6.6/src/env.c:1041:14: style: struct member 'env_iv::envst' is never used. [unusedStructMember] ruby-bdb-0.6.6/src/env.c:1382:15: style: Variable 'flags' is assigned a value that is never used. [unreadVariable] ruby-bdb-0.6.6/src/env.c:1801:15: style: Unused variable: value [unusedVariable] ruby-bdb-0.6.6/src/env.c:1803:17: style: Unused variable: strval [unusedVariable] ruby-bdb-0.6.6/src/lock.c:64:14: style: Unused variable: envst [unusedVariable] ruby-bdb-0.6.6/src/lock.c:111:14: style: Unused variable: b [unusedVariable] ruby-bdb-0.6.6/src/lock.c:112:9: style: Unused variable: flags [unusedVariable] ruby-bdb-0.6.6/src/log.c:145:16: style: Unused variable: b [unusedVariable] ruby-bdb-0.6.6/src/log.c:146:9: style: Unused variable: flags [unusedVariable] ruby-bdb-0.6.6/src/log.c:271:29: style: Unused variable: lsnst1 [unusedVariable] ruby-bdb-0.6.6/src/recnum.c:130:2: warning: Operator '|' with one operand equal to zero is redundant. [badBitmaskCheck] ruby-bdb-0.6.6/src/recnum.c:792:26: style: Clarify calculation precedence for '-' and '?'. [clarifyCalculation] ruby-bdb-0.6.6/src/recnum.c:376:34: style: Parameter 'argv' can be declared as pointer to const [constParameter] ruby-bdb-0.6.6/src/recnum.c:437:37: style: Parameter 'argv' can be declared as pointer to const [constParameter] ruby-bdb-0.6.6/src/transaction.c:351:2: warning:inconclusive: Possible null pointer dereference: envst [nullPointer] ruby-bdb-0.6.6/src/transaction.c:324:13: note: Assignment 'envst=0', assigned value is 0 ruby-bdb-0.6.6/src/transaction.c:351:2: note: Null pointer dereference ruby-bdb-0.6.6/src/transaction.c:352:9: warning:inconclusive: Possible null pointer dereference: envst [nullPointer] ruby-bdb-0.6.6/src/transaction.c:324:13: note: Assignment 'envst=0', assigned value is 0 ruby-bdb-0.6.6/src/transaction.c:352:9: note: Null pointer dereference ruby-bdb-0.6.6/src/transaction.c:356:9: warning:inconclusive: Possible null pointer dereference: envst [nullPointer] ruby-bdb-0.6.6/src/transaction.c:324:13: note: Assignment 'envst=0', assigned value is 0 ruby-bdb-0.6.6/src/transaction.c:356:9: note: Null pointer dereference ruby-bdb-0.6.6/src/transaction.c:358:16: warning:inconclusive: Possible null pointer dereference: envst [nullPointer] ruby-bdb-0.6.6/src/transaction.c:324:13: note: Assignment 'envst=0', assigned value is 0 ruby-bdb-0.6.6/src/transaction.c:358:16: note: Null pointer dereference ruby-bdb-0.6.6/src/transaction.c:359:12: warning:inconclusive: Possible null pointer dereference: envst [nullPointer] ruby-bdb-0.6.6/src/transaction.c:324:13: note: Assignment 'envst=0', assigned value is 0 ruby-bdb-0.6.6/src/transaction.c:359:12: note: Null pointer dereference ruby-bdb-0.6.6/src/transaction.c:143:11: style: Variable 'flags' is assigned a value that is never used. [unreadVariable] ruby-bdb-0.6.6/src/transaction.c:145:15: style: Variable 'flags' is assigned a value that is never used. [unreadVariable] ruby-bdb-0.6.6/src/transaction.c:326:13: style: Variable 'options' is assigned a value that is never used. [unreadVariable] ruby-bdb-0.6.6/src/transaction.c:479:19: style: Unused variable: id [unusedVariable] ruby-bdb-0.6.6/src/transaction.c:503:24: style: Variable 'flag' is assigned a value that is never used. [unreadVariable] ruby-bdb-0.6.6/src/transaction.c:501:17: style: Unused variable: c [unusedVariable] ruby-bdb-0.6.6/src/transaction.c:610:14: style: Unused variable: b [unusedVariable] ruby-bdb-0.6.6/src/transaction.c:612:9: style: Unused variable: flags [unusedVariable] ruby-bdb-0.6.6/util/marshal16.c:841:9: style: Same expression on both sides of '/'. [duplicateExpression] ruby-bdb-0.6.6/bdbxml1/bdbxml.h:58:9: error: The one definition rule is violated, different classes/structs have the same name 'xcon' [ctuOneDefinitionRuleViolation] ruby-bdb-0.6.6/bdbxml2/bdbxml.h:61:9: note: The one definition rule is violated, different classes/structs have the same name 'xcon' ruby-bdb-0.6.6/bdbxml1/bdbxml.h:58:9: note: The one definition rule is violated, different classes/structs have the same name 'xcon' ruby-bdb-0.6.6/bdbxml1/bdbxml.h:67:9: error: The one definition rule is violated, different classes/structs have the same name 'xres' [ctuOneDefinitionRuleViolation] ruby-bdb-0.6.6/bdbxml2/bdbxml.h:106:9: note: The one definition rule is violated, different classes/structs have the same name 'xres' ruby-bdb-0.6.6/bdbxml1/bdbxml.h:67:9: note: The one definition rule is violated, different classes/structs have the same name 'xres' ruby-bdb-0.6.6/bdbxml1/bdbxml.h:88:9: error: The one definition rule is violated, different classes/structs have the same name 'xdoc' [ctuOneDefinitionRuleViolation] ruby-bdb-0.6.6/bdbxml2/bdbxml.h:111:9: note: The one definition rule is violated, different classes/structs have the same name 'xdoc' ruby-bdb-0.6.6/bdbxml1/bdbxml.h:88:9: note: The one definition rule is violated, different classes/structs have the same name 'xdoc' ruby-bdb-0.6.6/bdbxml1/bdbxml.h:97:9: error: The one definition rule is violated, different classes/structs have the same name 'xupd' [ctuOneDefinitionRuleViolation] ruby-bdb-0.6.6/bdbxml2/bdbxml.h:116:9: note: The one definition rule is violated, different classes/structs have the same name 'xupd' ruby-bdb-0.6.6/bdbxml1/bdbxml.h:97:9: note: The one definition rule is violated, different classes/structs have the same name 'xupd' ruby-bdb-0.6.6/bdbxml1/bdbxml.h:93:9: error: The one definition rule is violated, different classes/structs have the same name 'xcxt' [ctuOneDefinitionRuleViolation] ruby-bdb-0.6.6/bdbxml2/bdbxml.h:127:9: note: The one definition rule is violated, different classes/structs have the same name 'xcxt' ruby-bdb-0.6.6/bdbxml1/bdbxml.h:93:9: note: The one definition rule is violated, different classes/structs have the same name 'xcxt' ruby-bdb-0.6.6/util/marshal16.c:585:9: error: Using argument arg that points at uninitialized variable arg [ctuuninitvar] ruby-bdb-0.6.6/util/marshal16.c:1105:19: note: Calling function r_byte, 1st argument is uninitialized ruby-bdb-0.6.6/util/marshal16.c:585:9: note: Using argument arg diff: head ruby-bdb-0.6.6/src/common.c:2593:5: warning: Operator '|' with one operand equal to zero is redundant. [badBitmaskCheck] head ruby-bdb-0.6.6/src/common.c:2631:9: warning: Operator '|' with one operand equal to zero is redundant. [badBitmaskCheck] head ruby-bdb-0.6.6/src/common.c:404:20: style: Parameter 'dbbd' can be declared as pointer to const [constParameter] 2.8 ruby-bdb-0.6.6/src/common.c:404:20: style: Parameter 'dbbd' can be declared with const [constParameter] head ruby-bdb-0.6.6/src/common.c:432:19: style: Parameter 'dbbd' can be declared as pointer to const [constParameter] 2.8 ruby-bdb-0.6.6/src/common.c:432:19: style: Parameter 'dbbd' can be declared with const [constParameter] head ruby-bdb-0.6.6/src/common.c:487:16: style: Parameter 'dbbd' can be declared as pointer to const [constParameter] 2.8 ruby-bdb-0.6.6/src/common.c:487:16: style: Parameter 'dbbd' can be declared with const [constParameter] head ruby-bdb-0.6.6/src/common.c:978:24: style: Parameter 'dbst' can be declared as pointer to const [constParameter] 2.8 ruby-bdb-0.6.6/src/common.c:978:24: style: Parameter 'dbst' can be declared with const [constParameter] head ruby-bdb-0.6.6/src/recnum.c:130:2: warning: Operator '|' with one operand equal to zero is redundant. [badBitmaskCheck] head ruby-bdb-0.6.6/src/recnum.c:376:34: style: Parameter 'argv' can be declared as pointer to const [constParameter] 2.8 ruby-bdb-0.6.6/src/recnum.c:376:34: style: Parameter 'argv' can be declared with const [constParameter] head ruby-bdb-0.6.6/src/recnum.c:437:37: style: Parameter 'argv' can be declared as pointer to const [constParameter] 2.8 ruby-bdb-0.6.6/src/recnum.c:437:37: style: Parameter 'argv' can be declared with const [constParameter] DONE