2022-06-25 00:51 ftp://ftp.de.debian.org/debian/pool/main/r/rquantlib/rquantlib_0.4.16.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 -j2 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: 11860cc (2022-06-24 13:55:04 +0200) count: 159 159 elapsed-time: 1.0 1.2 head-timing-info: Overall time: 0s old-timing-info: Overall time: 0s head results: RQuantLib/src/affine.cpp:47:17: style: C-style pointer casting [cstyleCast] RQuantLib/src/affine.cpp:199:17: style: C-style pointer casting [cstyleCast] RQuantLib/src/affine.cpp:217:17: style: C-style pointer casting [cstyleCast] RQuantLib/src/affine.cpp:232:17: style: C-style pointer casting [cstyleCast] RQuantLib/src/affine.cpp:249:17: style: C-style pointer casting [cstyleCast] RQuantLib/src/asian.cpp:25:42: performance: Function parameter 'averageType' should be passed by const reference. [passedByValue] RQuantLib/inst/include/rquantlib_internal.h:62:9: performance: Variable 'fixingDays' is assigned in constructor body. Consider performing initialization in initialization list. [useInitializationList] RQuantLib/inst/include/rquantlib_internal.h:63:9: performance: Variable 'calendar' is assigned in constructor body. Consider performing initialization in initialization list. [useInitializationList] RQuantLib/inst/include/rquantlib_internal.h:84:23: style:inconclusive: Technically the member function 'RQLObservable::getType' can be const. [functionConst] RQuantLib/inst/include/rquantlib_internal.h:85:9: style:inconclusive: Technically the member function 'RQLObservable::getN1' can be const. [functionConst] RQuantLib/inst/include/rquantlib_internal.h:86:9: style:inconclusive: Technically the member function 'RQLObservable::getN2' can be const. [functionConst] RQuantLib/inst/include/rquantlib_internal.h:87:24: style:inconclusive: Technically the member function 'RQLObservable::getUnits' can be const. [functionConst] RQuantLib/inst/include/RQuantLib_RcppExports.h:18:46: style: C-style pointer casting [cstyleCast] RQuantLib/inst/include/RQuantLib_RcppExports.h:32:40: style: C-style pointer casting [cstyleCast] RQuantLib/inst/include/RQuantLib_RcppExports.h:53:40: style: C-style pointer casting [cstyleCast] RQuantLib/inst/include/RQuantLib_RcppExports.h:74:49: style: C-style pointer casting [cstyleCast] RQuantLib/inst/include/RQuantLib_RcppExports.h:95:49: style: C-style pointer casting [cstyleCast] RQuantLib/inst/include/RQuantLib_RcppExports.h:116:28: style: C-style pointer casting [cstyleCast] RQuantLib/inst/include/RQuantLib_RcppExports.h:137:28: style: C-style pointer casting [cstyleCast] RQuantLib/inst/include/RQuantLib_RcppExports.h:158:28: style: C-style pointer casting [cstyleCast] RQuantLib/inst/include/RQuantLib_RcppExports.h:179:28: style: C-style pointer casting [cstyleCast] RQuantLib/inst/include/RQuantLib_RcppExports.h:200:48: style: C-style pointer casting [cstyleCast] RQuantLib/inst/include/RQuantLib_RcppExports.h:221:36: style: C-style pointer casting [cstyleCast] RQuantLib/inst/include/RQuantLib_RcppExports.h:242:36: style: C-style pointer casting [cstyleCast] RQuantLib/inst/include/RQuantLib_RcppExports.h:263:43: style: C-style pointer casting [cstyleCast] RQuantLib/inst/include/RQuantLib_RcppExports.h:284:42: style: C-style pointer casting [cstyleCast] RQuantLib/inst/include/RQuantLib_RcppExports.h:305:43: style: C-style pointer casting [cstyleCast] RQuantLib/inst/include/RQuantLib_RcppExports.h:326:44: style: C-style pointer casting [cstyleCast] RQuantLib/inst/include/RQuantLib_RcppExports.h:347:47: style: C-style pointer casting [cstyleCast] RQuantLib/inst/include/RQuantLib_RcppExports.h:368:36: style: C-style pointer casting [cstyleCast] RQuantLib/inst/include/RQuantLib_RcppExports.h:389:39: style: C-style pointer casting [cstyleCast] RQuantLib/inst/include/RQuantLib_RcppExports.h:410:29: style: C-style pointer casting [cstyleCast] RQuantLib/inst/include/RQuantLib_RcppExports.h:431:26: style: C-style pointer casting [cstyleCast] RQuantLib/inst/include/RQuantLib_RcppExports.h:452:30: style: C-style pointer casting [cstyleCast] RQuantLib/inst/include/RQuantLib_RcppExports.h:473:35: style: C-style pointer casting [cstyleCast] RQuantLib/inst/include/RQuantLib_RcppExports.h:494:55: style: C-style pointer casting [cstyleCast] RQuantLib/inst/include/RQuantLib_RcppExports.h:515:55: style: C-style pointer casting [cstyleCast] RQuantLib/inst/include/RQuantLib_RcppExports.h:536:32: style: C-style pointer casting [cstyleCast] RQuantLib/inst/include/RQuantLib_RcppExports.h:557:36: style: C-style pointer casting [cstyleCast] RQuantLib/inst/include/RQuantLib_RcppExports.h:578:41: style: C-style pointer casting [cstyleCast] RQuantLib/inst/include/RQuantLib_RcppExports.h:599:38: style: C-style pointer casting [cstyleCast] RQuantLib/inst/include/RQuantLib_RcppExports.h:620:38: style: C-style pointer casting [cstyleCast] RQuantLib/inst/include/RQuantLib_RcppExports.h:641:44: style: C-style pointer casting [cstyleCast] RQuantLib/src/RcppExports.cpp:31:1: style: Statements following return, break, continue, goto or throw will never be executed. [unreachableCode] RQuantLib/src/RcppExports.cpp:52:1: style: Statements following return, break, continue, goto or throw will never be executed. [unreachableCode] RQuantLib/src/RcppExports.cpp:72:1: style: Statements following return, break, continue, goto or throw will never be executed. [unreachableCode] RQuantLib/src/RcppExports.cpp:91:1: style: Statements following return, break, continue, goto or throw will never be executed. [unreachableCode] RQuantLib/src/RcppExports.cpp:111:1: style: Statements following return, break, continue, goto or throw will never be executed. [unreachableCode] RQuantLib/src/RcppExports.cpp:126:1: style: Statements following return, break, continue, goto or throw will never be executed. [unreachableCode] RQuantLib/src/RcppExports.cpp:142:1: style: Statements following return, break, continue, goto or throw will never be executed. [unreachableCode] RQuantLib/src/RcppExports.cpp:159:1: style: Statements following return, break, continue, goto or throw will never be executed. [unreachableCode] RQuantLib/src/RcppExports.cpp:200:1: style: Statements following return, break, continue, goto or throw will never be executed. [unreachableCode] RQuantLib/src/RcppExports.cpp:246:1: style: Statements following return, break, continue, goto or throw will never be executed. [unreachableCode] RQuantLib/src/RcppExports.cpp:292:1: style: Statements following return, break, continue, goto or throw will never be executed. [unreachableCode] RQuantLib/src/RcppExports.cpp:334:1: style: Statements following return, break, continue, goto or throw will never be executed. [unreachableCode] RQuantLib/src/RcppExports.cpp:378:1: style: Statements following return, break, continue, goto or throw will never be executed. [unreachableCode] RQuantLib/src/RcppExports.cpp:422:1: style: Statements following return, break, continue, goto or throw will never be executed. [unreachableCode] RQuantLib/src/RcppExports.cpp:468:1: style: Statements following return, break, continue, goto or throw will never be executed. [unreachableCode] RQuantLib/src/RcppExports.cpp:512:1: style: Statements following return, break, continue, goto or throw will never be executed. [unreachableCode] RQuantLib/src/RcppExports.cpp:550:1: style: Statements following return, break, continue, goto or throw will never be executed. [unreachableCode] RQuantLib/src/RcppExports.cpp:588:1: style: Statements following return, break, continue, goto or throw will never be executed. [unreachableCode] RQuantLib/src/RcppExports.cpp:627:1: style: Statements following return, break, continue, goto or throw will never be executed. [unreachableCode] RQuantLib/src/RcppExports.cpp:664:1: style: Statements following return, break, continue, goto or throw will never be executed. [unreachableCode] RQuantLib/src/RcppExports.cpp:706:1: style: Statements following return, break, continue, goto or throw will never be executed. [unreachableCode] RQuantLib/src/RcppExports.cpp:749:1: style: Statements following return, break, continue, goto or throw will never be executed. [unreachableCode] RQuantLib/src/RcppExports.cpp:795:1: style: Statements following return, break, continue, goto or throw will never be executed. [unreachableCode] RQuantLib/src/RcppExports.cpp:833:1: style: Statements following return, break, continue, goto or throw will never be executed. [unreachableCode] RQuantLib/src/RcppExports.cpp:871:1: style: Statements following return, break, continue, goto or throw will never be executed. [unreachableCode] RQuantLib/src/RcppExports.cpp:908:1: style: Statements following return, break, continue, goto or throw will never be executed. [unreachableCode] RQuantLib/src/RcppExports.cpp:920:1: style: Statements following return, break, continue, goto or throw will never be executed. [unreachableCode] RQuantLib/src/RcppExports.cpp:932:1: style: Statements following return, break, continue, goto or throw will never be executed. [unreachableCode] RQuantLib/src/RcppExports.cpp:944:1: style: Statements following return, break, continue, goto or throw will never be executed. [unreachableCode] RQuantLib/src/RcppExports.cpp:956:1: style: Statements following return, break, continue, goto or throw will never be executed. [unreachableCode] RQuantLib/src/RcppExports.cpp:968:1: style: Statements following return, break, continue, goto or throw will never be executed. [unreachableCode] RQuantLib/src/RcppExports.cpp:981:1: style: Statements following return, break, continue, goto or throw will never be executed. [unreachableCode] RQuantLib/src/RcppExports.cpp:997:1: style: Statements following return, break, continue, goto or throw will never be executed. [unreachableCode] RQuantLib/src/RcppExports.cpp:1012:1: style: Statements following return, break, continue, goto or throw will never be executed. [unreachableCode] RQuantLib/src/RcppExports.cpp:1027:1: style: Statements following return, break, continue, goto or throw will never be executed. [unreachableCode] RQuantLib/src/RcppExports.cpp:1041:1: style: Statements following return, break, continue, goto or throw will never be executed. [unreachableCode] RQuantLib/src/RcppExports.cpp:1054:1: style: Statements following return, break, continue, goto or throw will never be executed. [unreachableCode] RQuantLib/src/RcppExports.cpp:1065:1: style: Statements following return, break, continue, goto or throw will never be executed. [unreachableCode] RQuantLib/src/RcppExports.cpp:1076:1: style: Statements following return, break, continue, goto or throw will never be executed. [unreachableCode] RQuantLib/src/RcppExports.cpp:1087:1: style: Statements following return, break, continue, goto or throw will never be executed. [unreachableCode] RQuantLib/src/RcppExports.cpp:1123:1: style: Statements following return, break, continue, goto or throw will never be executed. [unreachableCode] RQuantLib/src/RcppExports.cpp:1159:1: style: Statements following return, break, continue, goto or throw will never be executed. [unreachableCode] RQuantLib/src/RcppExports.cpp:1193:1: style: Statements following return, break, continue, goto or throw will never be executed. [unreachableCode] RQuantLib/src/RcppExports.cpp:1231:1: style: Statements following return, break, continue, goto or throw will never be executed. [unreachableCode] RQuantLib/src/RcppExports.cpp:1248:1: style: Statements following return, break, continue, goto or throw will never be executed. [unreachableCode] RQuantLib/src/RcppExports.cpp:1265:1: style: Statements following return, break, continue, goto or throw will never be executed. [unreachableCode] RQuantLib/src/RcppExports.cpp:1282:1: style: Statements following return, break, continue, goto or throw will never be executed. [unreachableCode] RQuantLib/src/RcppExports.cpp:1325:1: style: Statements following return, break, continue, goto or throw will never be executed. [unreachableCode] RQuantLib/src/RcppExports.cpp:1368:1: style: Statements following return, break, continue, goto or throw will never be executed. [unreachableCode] RQuantLib/src/RcppExports.cpp:1378:1: style: Statements following return, break, continue, goto or throw will never be executed. [unreachableCode] RQuantLib/src/RcppExports.cpp:1411:1: style: Statements following return, break, continue, goto or throw will never be executed. [unreachableCode] RQuantLib/src/RcppExports.cpp:1444:1: style: Statements following return, break, continue, goto or throw will never be executed. [unreachableCode] RQuantLib/src/RcppExports.cpp:1486:1: style: Statements following return, break, continue, goto or throw will never be executed. [unreachableCode] RQuantLib/src/RcppExports.cpp:1531:1: style: Statements following return, break, continue, goto or throw will never be executed. [unreachableCode] RQuantLib/src/RcppExports.cpp:1566:1: style: Statements following return, break, continue, goto or throw will never be executed. [unreachableCode] RQuantLib/src/RcppExports.cpp:1605:1: style: Statements following return, break, continue, goto or throw will never be executed. [unreachableCode] RQuantLib/src/RcppExports.cpp:1620:1: style: Statements following return, break, continue, goto or throw will never be executed. [unreachableCode] RQuantLib/src/barrier_binary.cpp:24:43: performance: Function parameter 'binType' should be passed by const reference. [passedByValue] RQuantLib/src/barrier_binary.cpp:26:43: performance: Function parameter 'excType' should be passed by const reference. [passedByValue] RQuantLib/src/barrier_binary.cpp:179:44: performance: Function parameter 'barrType' should be passed by const reference. [passedByValue] RQuantLib/src/bonds.cpp:913:5: style:inconclusive: Consecutive return, break, continue, goto or throw statements are unnecessary. [duplicateBreak] RQuantLib/src/bonds.cpp:261:60: performance: Function parameter 'gearings' should be passed by const reference. [passedByValue] RQuantLib/src/bonds.cpp:261:90: performance: Function parameter 'caps' should be passed by const reference. [passedByValue] RQuantLib/src/bonds.cpp:262:43: performance: Function parameter 'spreads' should be passed by const reference. [passedByValue] RQuantLib/src/bonds.cpp:262:72: performance: Function parameter 'floors' should be passed by const reference. [passedByValue] RQuantLib/src/bonds.cpp:273:60: performance: Function parameter 'gearings' should be passed by const reference. [passedByValue] RQuantLib/src/bonds.cpp:273:90: performance: Function parameter 'caps' should be passed by const reference. [passedByValue] RQuantLib/src/bonds.cpp:274:43: performance: Function parameter 'spreads' should be passed by const reference. [passedByValue] RQuantLib/src/bonds.cpp:274:72: performance: Function parameter 'floors' should be passed by const reference. [passedByValue] RQuantLib/src/bonds.cpp:286:60: performance: Function parameter 'gearings' should be passed by const reference. [passedByValue] RQuantLib/src/bonds.cpp:286:90: performance: Function parameter 'caps' should be passed by const reference. [passedByValue] RQuantLib/src/bonds.cpp:287:43: performance: Function parameter 'spreads' should be passed by const reference. [passedByValue] RQuantLib/src/bonds.cpp:287:72: performance: Function parameter 'floors' should be passed by const reference. [passedByValue] RQuantLib/src/bonds.cpp:298:60: performance: Function parameter 'gearings' should be passed by const reference. [passedByValue] RQuantLib/src/bonds.cpp:298:90: performance: Function parameter 'caps' should be passed by const reference. [passedByValue] RQuantLib/src/bonds.cpp:299:43: performance: Function parameter 'spreads' should be passed by const reference. [passedByValue] RQuantLib/src/bonds.cpp:299:72: performance: Function parameter 'floors' should be passed by const reference. [passedByValue] RQuantLib/src/bonds.cpp:309:86: performance: Function parameter 'gearings' should be passed by const reference. [passedByValue] RQuantLib/src/bonds.cpp:310:63: performance: Function parameter 'spreads' should be passed by const reference. [passedByValue] RQuantLib/src/bonds.cpp:310:92: performance: Function parameter 'caps' should be passed by const reference. [passedByValue] RQuantLib/src/bonds.cpp:311:63: performance: Function parameter 'floors' should be passed by const reference. [passedByValue] RQuantLib/src/bermudan.cpp:48:10: style: C-style pointer casting [cstyleCast] RQuantLib/src/bermudan.cpp:203:17: style: C-style pointer casting [cstyleCast] RQuantLib/src/bermudan.cpp:222:17: style: C-style pointer casting [cstyleCast] RQuantLib/src/bermudan.cpp:237:17: style: C-style pointer casting [cstyleCast] RQuantLib/src/bermudan.cpp:253:17: style: C-style pointer casting [cstyleCast] RQuantLib/src/bermudan.cpp:431:17: style: C-style pointer casting [cstyleCast] RQuantLib/src/bermudan.cpp:450:17: style: C-style pointer casting [cstyleCast] RQuantLib/src/bermudan.cpp:465:17: style: C-style pointer casting [cstyleCast] RQuantLib/src/bermudan.cpp:481:17: style: C-style pointer casting [cstyleCast] RQuantLib/src/calendars.cpp:47:23: style: Expression is always false because 'else if' condition matches previous condition at line 45. [multiCondition] RQuantLib/src/calendars.cpp:202:53: style: Expression is always false because 'else if' condition matches previous condition at line 127. [multiCondition] RQuantLib/src/calendars.cpp:236:45: performance: Function parameter 'calendar' should be passed by const reference. [passedByValue] RQuantLib/src/calendars.cpp:247:41: performance: Function parameter 'calendar' should be passed by const reference. [passedByValue] RQuantLib/src/calendars.cpp:258:41: performance: Function parameter 'calendar' should be passed by const reference. [passedByValue] RQuantLib/src/calendars.cpp:269:44: performance: Function parameter 'calendar' should be passed by const reference. [passedByValue] RQuantLib/src/calendars.cpp:280:55: performance: Function parameter 'calendar' should be passed by const reference. [passedByValue] RQuantLib/src/calendars.cpp:291:48: performance: Function parameter 'calendar' should be passed by const reference. [passedByValue] RQuantLib/src/calendars.cpp:303:50: performance: Function parameter 'calendar' should be passed by const reference. [passedByValue] RQuantLib/src/calendars.cpp:319:50: performance: Function parameter 'calendar' should be passed by const reference. [passedByValue] RQuantLib/src/calendars.cpp:336:53: performance: Function parameter 'calendar' should be passed by const reference. [passedByValue] RQuantLib/src/calendars.cpp:350:56: performance: Function parameter 'calendar' should be passed by const reference. [passedByValue] RQuantLib/src/calendars.cpp:365:60: performance: Function parameter 'calendar' should be passed by const reference. [passedByValue] RQuantLib/src/calendars.cpp:378:30: performance: Function parameter 'calendar' should be passed by const reference. [passedByValue] RQuantLib/src/calendars.cpp:387:33: performance: Function parameter 'calendar' should be passed by const reference. [passedByValue] RQuantLib/src/curves.cpp:219:32: style: Parameter 'interpWhat' can be declared as reference to const [constParameter] RQuantLib/src/curves.cpp:219:57: style: Parameter 'interpHow' can be declared as reference to const [constParameter] RQuantLib/src/discount.cpp:60:12: style: The scope of the variable 'tolerance' can be reduced. [variableScope] RQuantLib/src/modules.cpp:81:1: error: There is an unknown macro here somewhere. Configuration is required. If RCPP_EXPOSED_CLASS is a macro then please configure it. [unknownMacro] RQuantLib/src/sabr.cpp:230:50: style: Local variable 'swapEngine' shadows outer variable [shadowVariable] RQuantLib/src/sabr.cpp:211:46: note: Shadowed declaration RQuantLib/src/sabr.cpp:230:50: note: Shadow variable RQuantLib/src/utils.cpp:132:16: style: The scope of the variable 'tolerance' can be reduced. [variableScope] RQuantLib/src/utils.cpp:136:56: style: Local variable 'flatRate' shadows outer function [shadowFunction] RQuantLib/src/utils.cpp:314:1: note: Shadowed declaration RQuantLib/src/utils.cpp:136:56: note: Shadow variable RQuantLib/src/utils.cpp:476:59: performance: Function parameter 'unit' should be passed by const reference. [passedByValue] RQuantLib/src/utils.cpp:519:75: performance: Function parameter 'type' should be passed by const reference. [passedByValue] RQuantLib/src/vanilla.cpp:213:64: style: Local variable 'engine' shadows outer argument [shadowArgument] RQuantLib/src/vanilla.cpp:127:45: note: Shadowed declaration RQuantLib/src/vanilla.cpp:213:64: note: Shadow variable RQuantLib/src/zero.cpp:136:17: style: Variable 'colNames[1]' is assigned a value that is never used. [unreadVariable] diff: head RQuantLib/src/curves.cpp:219:32: style: Parameter 'interpWhat' can be declared as reference to const [constParameter] 2.8 RQuantLib/src/curves.cpp:219:32: style: Parameter 'interpWhat' can be declared with const [constParameter] head RQuantLib/src/curves.cpp:219:57: style: Parameter 'interpHow' can be declared as reference to const [constParameter] 2.8 RQuantLib/src/curves.cpp:219:57: style: Parameter 'interpHow' can be declared with const [constParameter] DONE