2024-04-12 15:06 ftp://ftp.de.debian.org/debian/pool/main/r/rquantlib/rquantlib_0.4.21.orig.tar.gz cppcheck-options: --library=posix --library=gnu --library=bsd --library=boost --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.56 compiler: g++ (Debian 12.2.0-14) 12.2.0 cppcheck: head 2.13.0 head-info: 646f869 (2024-04-12 10:43:30 +0200) count: 113 82 elapsed-time: 1.0 1.4 head-timing-info: old-timing-info: head results: RQuantLib/src/asian.cpp:62:21: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable R_NilValue [valueFlowBailoutIncompleteVar] RQuantLib/src/asian.cpp:25:42: performance: Function parameter 'averageType' should be passed by const reference. [passedByValue] RQuantLib/src/RcppExports.cpp:31:1: error: There is an unknown macro here somewhere. Configuration is required. If END_RCPP is a macro then please configure it. [unknownMacro] RQuantLib/src/affine.cpp:83:28: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable settleDate [valueFlowBailoutIncompleteVar] RQuantLib/src/barrier_binary.cpp:114:108: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable R_NaN [valueFlowBailoutIncompleteVar] RQuantLib/src/barrier_binary.cpp:197:62: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable DownIn [valueFlowBailoutIncompleteVar] 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/calendars.cpp:54:59: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable Settlement [valueFlowBailoutIncompleteVar] RQuantLib/src/calendars.cpp:226:28: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable fixingDays [valueFlowBailoutIncompleteVar] RQuantLib/src/bermudan.cpp:74:28: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable settleDate [valueFlowBailoutIncompleteVar] RQuantLib/src/bermudan.cpp:299:28: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable settleDate [valueFlowBailoutIncompleteVar] RQuantLib/src/bonds.cpp:37:58: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable calendar [valueFlowBailoutIncompleteVar] RQuantLib/src/bonds.cpp:68:58: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable calendar [valueFlowBailoutIncompleteVar] RQuantLib/src/bonds.cpp:220:56: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable Months [valueFlowBailoutIncompleteVar] RQuantLib/src/bonds.cpp:480:97: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable Annual [valueFlowBailoutIncompleteVar] RQuantLib/src/bonds.cpp:599:75: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable Annual [valueFlowBailoutIncompleteVar] RQuantLib/src/bonds.cpp:710:75: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable Annual [valueFlowBailoutIncompleteVar] RQuantLib/src/bonds.cpp:749:99: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable Months [valueFlowBailoutIncompleteVar] RQuantLib/src/bonds.cpp:910:79: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable Compounded [valueFlowBailoutIncompleteVar] RQuantLib/src/bonds.cpp:945:58: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable calendar [valueFlowBailoutIncompleteVar] 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/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/curves.cpp:28:5: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable db_ [valueFlowBailoutIncompleteVar] RQuantLib/src/curves.cpp:85:60: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable settleDate [valueFlowBailoutIncompleteVar] RQuantLib/src/curves.cpp:156:60: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable settleDate [valueFlowBailoutIncompleteVar] RQuantLib/src/curves.cpp:291:15: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable Rcout [valueFlowBailoutIncompleteVar] 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 [constParameterReference] RQuantLib/src/curves.cpp:219:57: style: Parameter 'interpHow' can be declared as reference to const [constParameterReference] RQuantLib/src/dates.cpp:31:53: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable calendar [valueFlowBailoutIncompleteVar] RQuantLib/src/discount.cpp:36:28: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable settleDate [valueFlowBailoutIncompleteVar] 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/implieds.cpp:129:117: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable JR [valueFlowBailoutIncompleteVar] 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/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/discount.cpp:60:12: style: The scope of the variable 'tolerance' can be reduced. [variableScope] RQuantLib/src/vanilla.cpp:89:9: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable QL_DEPRECATED_DISABLE_WARNING [valueFlowBailoutIncompleteVar] RQuantLib/src/vanilla.cpp:188:9: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable QL_DEPRECATED_DISABLE_WARNING [valueFlowBailoutIncompleteVar] RQuantLib/src/zero.cpp:26:58: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable calendar [valueFlowBailoutIncompleteVar] RQuantLib/src/zero.cpp:48:58: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable calendar [valueFlowBailoutIncompleteVar] RQuantLib/src/zero.cpp:86:58: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable calendar [valueFlowBailoutIncompleteVar] RQuantLib/src/utils.cpp:28:40: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable Call [valueFlowBailoutIncompleteVar] RQuantLib/src/utils.cpp:113:28: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable settleDate [valueFlowBailoutIncompleteVar] RQuantLib/src/utils.cpp:176:79: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable Backward [valueFlowBailoutIncompleteVar] RQuantLib/src/utils.cpp:204:67: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable Following [valueFlowBailoutIncompleteVar] RQuantLib/src/utils.cpp:283:105: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable Months [valueFlowBailoutIncompleteVar] RQuantLib/src/utils.cpp:362:63: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable ISDA [valueFlowBailoutIncompleteVar] RQuantLib/src/utils.cpp:409:26: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable Following [valueFlowBailoutIncompleteVar] RQuantLib/src/utils.cpp:428:26: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable Simple [valueFlowBailoutIncompleteVar] RQuantLib/src/utils.cpp:440:26: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable NoFrequency [valueFlowBailoutIncompleteVar] RQuantLib/src/utils.cpp:468:39: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable Years [valueFlowBailoutIncompleteVar] RQuantLib/src/utils.cpp:480:26: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable Days [valueFlowBailoutIncompleteVar] RQuantLib/src/utils.cpp:491:42: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable Backward [valueFlowBailoutIncompleteVar] RQuantLib/src/utils.cpp:616:106: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable Clean [valueFlowBailoutIncompleteVar] RQuantLib/src/utils.cpp:630:36: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable Simple [valueFlowBailoutIncompleteVar] RQuantLib/src/utils.cpp:654:24: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PACKAGE_VERSION [valueFlowBailoutIncompleteVar] RQuantLib/src/zero.cpp:136:17: style: Variable 'colNames[1]' is assigned a value that is never used. [unreadVariable] RQuantLib/src/utils.cpp:131:12: style: The scope of the variable 'tolerance' can be reduced. [variableScope] RQuantLib/src/utils.cpp:467:59: performance: Function parameter 'unit' should be passed by const reference. [passedByValue] RQuantLib/src/utils.cpp:510:75: performance: Function parameter 'type' should be passed by const reference. [passedByValue] RQuantLib/src/sabr.cpp:83:67: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable ModifiedFollowing [valueFlowBailoutIncompleteVar] RQuantLib/src/sabr.cpp:202:77: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable Months [valueFlowBailoutIncompleteVar] RQuantLib/src/vanilla.cpp:218:64: style: Local variable 'engine' shadows outer argument [shadowArgument] RQuantLib/src/vanilla.cpp:130:45: note: Shadowed declaration RQuantLib/src/vanilla.cpp:218:64: note: Shadow variable RQuantLib/src/sabr.cpp:234:50: style: Local variable 'swapEngine' shadows outer variable [shadowVariable] RQuantLib/src/sabr.cpp:215:46: note: Shadowed declaration RQuantLib/src/sabr.cpp:234:50: note: Shadow variable RQuantLib/src/sabr.cpp:34:57: style: Parameter 'atmVols' can be declared as reference to const [constParameterReference] RQuantLib/src/sabr.cpp:36:57: style: Parameter 'smirkVols' can be declared as reference to const [constParameterReference] diff: head RQuantLib/src/barrier_binary.cpp:197:62: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable DownIn [valueFlowBailoutIncompleteVar] head RQuantLib/src/bermudan.cpp:299:28: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable settleDate [valueFlowBailoutIncompleteVar] head RQuantLib/src/bonds.cpp:220:56: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable Months [valueFlowBailoutIncompleteVar] head RQuantLib/src/bonds.cpp:480:97: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable Annual [valueFlowBailoutIncompleteVar] head RQuantLib/src/bonds.cpp:599:75: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable Annual [valueFlowBailoutIncompleteVar] head RQuantLib/src/bonds.cpp:68:58: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable calendar [valueFlowBailoutIncompleteVar] head RQuantLib/src/bonds.cpp:710:75: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable Annual [valueFlowBailoutIncompleteVar] head RQuantLib/src/bonds.cpp:749:99: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable Months [valueFlowBailoutIncompleteVar] head RQuantLib/src/bonds.cpp:910:79: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable Compounded [valueFlowBailoutIncompleteVar] head RQuantLib/src/bonds.cpp:945:58: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable calendar [valueFlowBailoutIncompleteVar] head RQuantLib/src/calendars.cpp:226:28: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable fixingDays [valueFlowBailoutIncompleteVar] head RQuantLib/src/curves.cpp:156:60: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable settleDate [valueFlowBailoutIncompleteVar] head RQuantLib/src/curves.cpp:291:15: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable Rcout [valueFlowBailoutIncompleteVar] head RQuantLib/src/curves.cpp:85:60: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable settleDate [valueFlowBailoutIncompleteVar] head RQuantLib/src/sabr.cpp:202:77: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable Months [valueFlowBailoutIncompleteVar] head RQuantLib/src/utils.cpp:113:28: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable settleDate [valueFlowBailoutIncompleteVar] 2.13.0 RQuantLib/src/utils.cpp:135:52: style: Local variable 'flatRate' shadows outer function [shadowFunction] RQuantLib/src/utils.cpp:305:1: note: Shadowed declaration RQuantLib/src/utils.cpp:135:52: note: Shadow variable head RQuantLib/src/utils.cpp:176:79: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable Backward [valueFlowBailoutIncompleteVar] head RQuantLib/src/utils.cpp:204:67: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable Following [valueFlowBailoutIncompleteVar] head RQuantLib/src/utils.cpp:283:105: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable Months [valueFlowBailoutIncompleteVar] head RQuantLib/src/utils.cpp:362:63: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable ISDA [valueFlowBailoutIncompleteVar] head RQuantLib/src/utils.cpp:409:26: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable Following [valueFlowBailoutIncompleteVar] head RQuantLib/src/utils.cpp:428:26: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable Simple [valueFlowBailoutIncompleteVar] head RQuantLib/src/utils.cpp:440:26: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable NoFrequency [valueFlowBailoutIncompleteVar] head RQuantLib/src/utils.cpp:468:39: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable Years [valueFlowBailoutIncompleteVar] head RQuantLib/src/utils.cpp:480:26: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable Days [valueFlowBailoutIncompleteVar] head RQuantLib/src/utils.cpp:491:42: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable Backward [valueFlowBailoutIncompleteVar] head RQuantLib/src/utils.cpp:616:106: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable Clean [valueFlowBailoutIncompleteVar] head RQuantLib/src/utils.cpp:630:36: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable Simple [valueFlowBailoutIncompleteVar] head RQuantLib/src/utils.cpp:654:24: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PACKAGE_VERSION [valueFlowBailoutIncompleteVar] head RQuantLib/src/vanilla.cpp:188:9: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable QL_DEPRECATED_DISABLE_WARNING [valueFlowBailoutIncompleteVar] head RQuantLib/src/zero.cpp:48:58: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable calendar [valueFlowBailoutIncompleteVar] head RQuantLib/src/zero.cpp:86:58: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable calendar [valueFlowBailoutIncompleteVar] DONE