2025-05-07 16:26 ftp://ftp.de.debian.org/debian/pool/main/r/r-cran-surveillance/r-cran-surveillance_1.24.1.orig.tar.gz 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 -j3 platform: Linux-6.8.0-1022-oracle-aarch64-with-glibc2.39 python: 3.12.3 client-version: 1.3.67 compiler: g++ (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0 cppcheck: head 2.17.0 head-info: 3726ace (2025-05-07 13:02:19 +0200) count: 136 134 elapsed-time: 0.2 0.2 head-timing-info: old-timing-info: head results: surveillance/src/determineSources.c:33:44: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable VECSXP [valueFlowBailoutIncompleteVar] surveillance/src/backproj.c:30:38: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable REALSXP [valueFlowBailoutIncompleteVar] surveillance/src/init.c:61:30: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable FALSE [valueFlowBailoutIncompleteVar] surveillance/src/backproj.c:10:11: style: Variable 'lambdaOld' can be declared as pointer to const [constVariablePointer] surveillance/src/backproj.c:12:11: style: Variable 'y' can be declared as pointer to const [constVariablePointer] surveillance/src/backproj.c:13:11: style: Variable 'incuPmf' can be declared as pointer to const [constVariablePointer] surveillance/src/determineSources.c:23:13: style: Variable 'eventTimes' can be declared as pointer to const [constVariablePointer] surveillance/src/determineSources.c:24:13: style: Variable 'eps_t' can be declared as pointer to const [constVariablePointer] surveillance/src/determineSources.c:26:13: style: Variable 'ycoords' can be declared as pointer to const [constVariablePointer] surveillance/src/determineSources.c:27:13: style: Variable 'eps_s' can be declared as pointer to const [constVariablePointer] surveillance/src/determineSources.c:28:10: style: Variable 'eventTypes0' can be declared as pointer to const [constVariablePointer] surveillance/src/determineSources.c:29:10: style: Variable 'qmatrix' can be declared as pointer to const [constVariablePointer] surveillance/src/ks.c:77:17: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable M_1_SQRT_2PI [valueFlowBailoutIncompleteVar] surveillance/src/ks.c:154:20: style: Parameter 'A' can be declared as pointer to const [constParameterPointer] surveillance/src/ks.c:154:31: style: Parameter 'B' can be declared as pointer to const [constParameterPointer] surveillance/src/twinstim_siaf_polyCub_iso.c:19:49: style: Parameter 'logpars' can be declared as pointer to const. However it seems that 'intrfr_powerlaw' is a callback function, if 'logpars' is declared with const you might also need to cast function pointer(s). [constParameterCallback] surveillance/src/twinstim_siaf_polyCub_iso.c:183:23: note: You might need to cast the function pointer here surveillance/src/twinstim_siaf_polyCub_iso.c:19:49: note: Parameter 'logpars' can be declared as pointer to const surveillance/src/twinstim_siaf_polyCub_iso.c:34:59: style: Parameter 'logpars' can be declared as pointer to const. However it seems that 'intrfr_powerlaw_dlogsigma' is a callback function, if 'logpars' is declared with const you might also need to cast function pointer(s). [constParameterCallback] surveillance/src/twinstim_siaf_polyCub_iso.c:184:23: note: You might need to cast the function pointer here surveillance/src/twinstim_siaf_polyCub_iso.c:34:59: note: Parameter 'logpars' can be declared as pointer to const surveillance/src/twinstim_siaf_polyCub_iso.c:41:55: style: Parameter 'logpars' can be declared as pointer to const. However it seems that 'intrfr_powerlaw_dlogd' is a callback function, if 'logpars' is declared with const you might also need to cast function pointer(s). [constParameterCallback] surveillance/src/twinstim_siaf_polyCub_iso.c:185:23: note: You might need to cast the function pointer here surveillance/src/twinstim_siaf_polyCub_iso.c:41:55: note: Parameter 'logpars' can be declared as pointer to const surveillance/src/twinstim_siaf_polyCub_iso.c:62:48: style: Parameter 'logpars' can be declared as pointer to const. However it seems that 'intrfr_student' is a callback function, if 'logpars' is declared with const you might also need to cast function pointer(s). [constParameterCallback] surveillance/src/twinstim_siaf_polyCub_iso.c:186:23: note: You might need to cast the function pointer here surveillance/src/twinstim_siaf_polyCub_iso.c:62:48: note: Parameter 'logpars' can be declared as pointer to const surveillance/src/twinstim_siaf_polyCub_iso.c:74:58: style: Parameter 'logpars' can be declared as pointer to const. However it seems that 'intrfr_student_dlogsigma' is a callback function, if 'logpars' is declared with const you might also need to cast function pointer(s). [constParameterCallback] surveillance/src/twinstim_siaf_polyCub_iso.c:187:23: note: You might need to cast the function pointer here surveillance/src/twinstim_siaf_polyCub_iso.c:74:58: note: Parameter 'logpars' can be declared as pointer to const surveillance/src/twinstim_siaf_polyCub_iso.c:87:54: style: Parameter 'logpars' can be declared as pointer to const. However it seems that 'intrfr_student_dlogd' is a callback function, if 'logpars' is declared with const you might also need to cast function pointer(s). [constParameterCallback] surveillance/src/twinstim_siaf_polyCub_iso.c:188:23: note: You might need to cast the function pointer here surveillance/src/twinstim_siaf_polyCub_iso.c:87:54: note: Parameter 'logpars' can be declared as pointer to const surveillance/src/twinstim_siaf_polyCub_iso.c:107:50: style: Parameter 'logpars' can be declared as pointer to const. However it seems that 'intrfr_powerlawL' is a callback function, if 'logpars' is declared with const you might also need to cast function pointer(s). [constParameterCallback] surveillance/src/twinstim_siaf_polyCub_iso.c:189:23: note: You might need to cast the function pointer here surveillance/src/twinstim_siaf_polyCub_iso.c:107:50: note: Parameter 'logpars' can be declared as pointer to const surveillance/src/twinstim_siaf_polyCub_iso.c:119:60: style: Parameter 'logpars' can be declared as pointer to const. However it seems that 'intrfr_powerlawL_dlogsigma' is a callback function, if 'logpars' is declared with const you might also need to cast function pointer(s). [constParameterCallback] surveillance/src/twinstim_siaf_polyCub_iso.c:190:23: note: You might need to cast the function pointer here surveillance/src/twinstim_siaf_polyCub_iso.c:119:60: note: Parameter 'logpars' can be declared as pointer to const surveillance/src/twinstim_siaf_polyCub_iso.c:129:56: style: Parameter 'logpars' can be declared as pointer to const. However it seems that 'intrfr_powerlawL_dlogd' is a callback function, if 'logpars' is declared with const you might also need to cast function pointer(s). [constParameterCallback] surveillance/src/twinstim_siaf_polyCub_iso.c:191:23: note: You might need to cast the function pointer here surveillance/src/twinstim_siaf_polyCub_iso.c:129:56: note: Parameter 'logpars' can be declared as pointer to const surveillance/src/twinstim_siaf_polyCub_iso.c:143:49: style: Parameter 'logsigma' can be declared as pointer to const. However it seems that 'intrfr_gaussian' is a callback function, if 'logsigma' is declared with const you might also need to cast function pointer(s). [constParameterCallback] surveillance/src/twinstim_siaf_polyCub_iso.c:192:23: note: You might need to cast the function pointer here surveillance/src/twinstim_siaf_polyCub_iso.c:143:49: note: Parameter 'logsigma' can be declared as pointer to const surveillance/src/twinstim_siaf_polyCub_iso.c:149:59: style: Parameter 'logsigma' can be declared as pointer to const. However it seems that 'intrfr_gaussian_dlogsigma' is a callback function, if 'logsigma' is declared with const you might also need to cast function pointer(s). [constParameterCallback] surveillance/src/twinstim_siaf_polyCub_iso.c:193:23: note: You might need to cast the function pointer here surveillance/src/twinstim_siaf_polyCub_iso.c:149:59: note: Parameter 'logsigma' can be declared as pointer to const surveillance/src/twinstim_siaf_polyCub_iso.c:157:52: style: Parameter 'logsigma' can be declared as pointer to const. However it seems that 'intrfr_exponential' is a callback function, if 'logsigma' is declared with const you might also need to cast function pointer(s). [constParameterCallback] surveillance/src/twinstim_siaf_polyCub_iso.c:194:23: note: You might need to cast the function pointer here surveillance/src/twinstim_siaf_polyCub_iso.c:157:52: note: Parameter 'logsigma' can be declared as pointer to const surveillance/src/twinstim_siaf_polyCub_iso.c:163:62: style: Parameter 'logsigma' can be declared as pointer to const. However it seems that 'intrfr_exponential_dlogsigma' is a callback function, if 'logsigma' is declared with const you might also need to cast function pointer(s). [constParameterCallback] surveillance/src/twinstim_siaf_polyCub_iso.c:195:23: note: You might need to cast the function pointer here surveillance/src/twinstim_siaf_polyCub_iso.c:163:62: note: Parameter 'logsigma' can be declared as pointer to const surveillance/src/twinstim_siaf_polyCub_iso.c:175:10: style: Parameter 'intrfr_code' can be declared as pointer to const [constParameterPointer] surveillance/src/stcd-assuncaocorrea.cc:71:36: style: The scope of the variable 'Soma' can be reduced. [variableScope] surveillance/src/stcd-assuncaocorrea.cc:191:16: style: The scope of the variable 'NCj' can be reduced. [variableScope] surveillance/src/stcd-assuncaocorrea.cc:191:21: style: The scope of the variable 'NumTotEvt' can be reduced. [variableScope] surveillance/src/stcd-assuncaocorrea.cc:191:32: style: The scope of the variable 'NumEvtCil' can be reduced. [variableScope] surveillance/src/stcd-assuncaocorrea.cc:193:36: style: The scope of the variable 'UCj' can be reduced. [variableScope] surveillance/src/stcd-assuncaocorrea.cc:193:41: style: The scope of the variable 'fator' can be reduced. [variableScope] surveillance/src/stcd-assuncaocorrea.cc:193:48: style: The scope of the variable 'lambda' can be reduced. [variableScope] surveillance/src/stcd-assuncaocorrea.cc:286:28: style: Parameter 'x' can be declared as pointer to const [constParameterPointer] surveillance/src/stcd-assuncaocorrea.cc:286:39: style: Parameter 'y' can be declared as pointer to const [constParameterPointer] surveillance/src/stcd-assuncaocorrea.cc:286:50: style: Parameter 't' can be declared as pointer to const [constParameterPointer] surveillance/src/stcd-assuncaocorrea.cc:286:58: style: Parameter 'n' can be declared as pointer to const [constParameterPointer] surveillance/src/stcd-assuncaocorrea.cc:286:69: style: Parameter 'radius' can be declared as pointer to const [constParameterPointer] surveillance/src/stcd-assuncaocorrea.cc:287:14: style: Parameter 'epsilon' can be declared as pointer to const [constParameterPointer] surveillance/src/stcd-assuncaocorrea.cc:287:31: style: Parameter 'areaA' can be declared as pointer to const [constParameterPointer] surveillance/src/stcd-assuncaocorrea.cc:288:11: style: Parameter 'cusum' can be declared as pointer to const [constParameterPointer] surveillance/src/stcd-assuncaocorrea.cc:288:26: style: Parameter 'threshold' can be declared as pointer to const [constParameterPointer] surveillance/src/stcd-assuncaocorrea.cc:122:24: style: Unused variable: it2 [unusedVariable] surveillance/src/stcd-assuncaocorrea.cc:122:29: style: Unused variable: jt2 [unusedVariable] surveillance/src/stcd-assuncaocorrea.cc:122:34: style: Unused variable: ev0 [unusedVariable] surveillance/src/surveillance.c:541:28: style:inconclusive: Boolean expression 'phi_new>-18' is used in bitwise operation. Did you mean '&&'? [bitwiseOnBoolean] surveillance/src/surveillance.c:541:73: style:inconclusive: Boolean expression 'iter-18' is used in bitwise operation. Did you mean '&&'? [bitwiseOnBoolean] surveillance/src/surveillance.c:811:69: style:inconclusive: Boolean expression 'iter-18' is used in bitwise operation. Did you mean '&&'? [bitwiseOnBoolean] surveillance/src/surveillance.c:1063:69: style:inconclusive: Boolean expression 'iter