2025-05-06 16:54 ftp://ftp.de.debian.org/debian/pool/main/o/octave-stk/octave-stk_2.8.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: 56be00d (2025-05-06 17:27:07 +0200) count: 74 73 elapsed-time: 1.1 1.1 head-timing-info: old-timing-info: head results: stk/src/stk_dist_matrixx.c:79:34: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable mxREAL [valueFlowBailoutIncompleteVar] stk/src/stk_dist_matrixy.c:79:36: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable mxREAL [valueFlowBailoutIncompleteVar] stk/src/stk_dist_matrixy.c:38:31: style: Parameter 'x' can be declared as pointer to const [constParameterPointer] stk/src/stk_dist_matrixy.c:38:42: style: Parameter 'y' can be declared as pointer to const [constParameterPointer] stk/src/stk_dist_matrixx.c:37:31: style: Parameter 'x' can be declared as pointer to const [constParameterPointer] stk/src/stk_dist_pairwise.c:76:34: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable mxREAL [valueFlowBailoutIncompleteVar] stk/src/stk_dist_pairwise.c:37:31: style: Parameter 'x' can be declared as pointer to const [constParameterPointer] stk/src/stk_dist_pairwise.c:37:42: style: Parameter 'y' can be declared as pointer to const [constParameterPointer] stk/src/stk_distrib_bivnorm0_cdf.c:96:41: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable mxREAL [valueFlowBailoutIncompleteVar] stk/src/stk_dominatedhv_mex.c:103:43: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable mxREAL [valueFlowBailoutIncompleteVar] stk/src/stk_filldist_discr_mex.c:43:10: style: Parameter 'x' can be declared as pointer to const [constParameterPointer] stk/src/stk_filldist_discr_mex.c:44:10: style: Parameter 'y' can be declared as pointer to const [constParameterPointer] stk/src/stk_gpquadform_matrixx.c:98:36: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable mxREAL [valueFlowBailoutIncompleteVar] stk/src/stk_gpquadform_matrixx.c:39:10: style: Parameter 'x' can be declared as pointer to const [constParameterPointer] stk/src/stk_gpquadform_matrixx.c:39:21: style: Parameter 'rx2' can be declared as pointer to const [constParameterPointer] stk/src/stk_gpquadform_matrixx.c:74:14: style: Variable 'p' can be declared as pointer to const [constVariablePointer] stk/src/stk_distrib_bivnorm0_cdf.c:56:35: style: Variable 'u2' can be declared as pointer to const [constVariablePointer] stk/src/stk_distrib_bivnorm0_cdf.c:56:40: style: Variable 'rho' can be declared as pointer to const [constVariablePointer] stk/src/stk_distrib_bivnorm0_cdf.c:427:17: style: Variable 'a' can be declared as const array [constVariable] stk/src/stk_distrib_bivnorm0_cdf.c:237:12: style: struct member 'Anonymous0::e_1' is never used. [unusedStructMember] stk/src/stk_distrib_bivnorm0_cdf.c:238:12: style: struct member 'Anonymous0::fill_2' is never used. [unusedStructMember] stk/src/stk_distrib_bivnorm0_cdf.c:239:12: style: struct member 'Anonymous0::e_3' is never used. [unusedStructMember] stk/src/stk_distrib_bivnorm0_cdf.c:240:12: style: struct member 'Anonymous0::fill_4' is never used. [unusedStructMember] stk/src/stk_distrib_bivnorm0_cdf.c:241:12: style: struct member 'Anonymous0::e_5' is never used. [unusedStructMember] stk/src/stk_gpquadform_matrixy.c:113:36: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable mxREAL [valueFlowBailoutIncompleteVar] stk/src/stk_distrib_bivnorm0_cdf.c:260:12: style: struct member 'Anonymous1::e_1' is never used. [unusedStructMember] stk/src/stk_distrib_bivnorm0_cdf.c:261:12: style: struct member 'Anonymous1::fill_2' is never used. [unusedStructMember] stk/src/stk_distrib_bivnorm0_cdf.c:262:12: style: struct member 'Anonymous1::e_3' is never used. [unusedStructMember] stk/src/stk_distrib_bivnorm0_cdf.c:263:12: style: struct member 'Anonymous1::fill_4' is never used. [unusedStructMember] stk/src/stk_distrib_bivnorm0_cdf.c:264:12: style: struct member 'Anonymous1::e_5' is never used. [unusedStructMember] stk/src/stk_gpquadform_matrixy.c:39:10: style: Parameter 'x' can be declared as pointer to const [constParameterPointer] stk/src/stk_gpquadform_matrixy.c:39:21: style: Parameter 'y' can be declared as pointer to const [constParameterPointer] stk/src/stk_gpquadform_matrixy.c:39:32: style: Parameter 'rx2' can be declared as pointer to const [constParameterPointer] stk/src/stk_gpquadform_matrixy.c:39:45: style: Parameter 'ry2' can be declared as pointer to const [constParameterPointer] stk/src/stk_gpquadform_matrixy.c:74:14: style: Variable 'p' can be declared as pointer to const [constVariablePointer] stk/src/stk_gpquadform_pairwise.c:95:34: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable mxREAL [valueFlowBailoutIncompleteVar] stk/src/stk_gpquadform_pairwise.c:39:10: style: Parameter 'x' can be declared as pointer to const [constParameterPointer] stk/src/stk_gpquadform_pairwise.c:39:21: style: Parameter 'y' can be declared as pointer to const [constParameterPointer] stk/src/stk_gpquadform_pairwise.c:39:32: style: Parameter 'rx' can be declared as pointer to const [constParameterPointer] stk/src/stk_gpquadform_pairwise.c:39:44: style: Parameter 'ry' can be declared as pointer to const [constParameterPointer] stk/src/stk_isdominated_mex.c:100:52: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable mxREAL [valueFlowBailoutIncompleteVar] stk/src/stk_mindist_mex.c:90:42: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable mxREAL [valueFlowBailoutIncompleteVar] stk/src/stk_mindist_mex.c:62:15: warning: Invalid sqrt() argument nr 1. The value is -1 but the valid values are '0.0:'. [invalidFunctionArg] stk/src/stk_mindist_mex.c:44:22: note: Assignment 'mindist_squared=-1', assigned value is -1 stk/src/stk_mindist_mex.c:46:17: note: Assuming condition is false stk/src/stk_mindist_mex.c:62:15: note: Invalid argument stk/src/stk_mindist_mex.c:39:39: style: Parameter 'x' can be declared as pointer to const [constParameterPointer] stk/src/pareto.h:143:12: warning: If memory allocation fails, then there is a possible null pointer dereference: tab [nullPointerOutOfMemory] stk/src/pareto.h:139:31: note: Assuming allocation function fails stk/src/pareto.h:139:11: note: Assignment 'tab=(struct T*)malloc(n*sizeof(struct T))', assigned value is 0 stk/src/pareto.h:143:12: note: Null pointer dereference stk/src/pareto.h:147:18: warning: If memory allocation fails, then there is a possible null pointer dereference: tab [nullPointerOutOfMemory] stk/src/pareto.h:139:31: note: Assuming allocation function fails stk/src/pareto.h:139:11: note: Assignment 'tab=(struct T*)malloc(n*sizeof(struct T))', assigned value is 0 stk/src/pareto.h:147:18: note: Null pointer dereference stk/src/pareto.h:185:12: warning: If memory allocation fails, then there is a possible null pointer dereference: tab [nullPointerOutOfMemory] stk/src/pareto.h:181:31: note: Assuming allocation function fails stk/src/pareto.h:181:11: note: Assignment 'tab=(struct T*)malloc(n*sizeof(struct T))', assigned value is 0 stk/src/pareto.h:185:12: note: Null pointer dereference stk/src/pareto.h:197:18: warning: If memory allocation fails, then there is a possible null pointer dereference: tab [nullPointerOutOfMemory] stk/src/pareto.h:181:31: note: Assuming allocation function fails stk/src/pareto.h:181:11: note: Assignment 'tab=(struct T*)malloc(n*sizeof(struct T))', assigned value is 0 stk/src/pareto.h:197:18: note: Null pointer dereference stk/src/pareto.h:285:9: warning: If memory allocation fails, then there is a possible null pointer dereference: tab [nullPointerOutOfMemory] stk/src/pareto.h:181:31: note: Assuming allocation function fails stk/src/pareto.h:181:11: note: Assignment 'tab=(struct T*)malloc(n*sizeof(struct T))', assigned value is 0 stk/src/pareto.h:182:22: note: Calling function '__init_tab__', 2nd argument 'tab' value is 0 stk/src/pareto.h:285:9: note: Null pointer dereference stk/src/pareto.h:286:9: warning: If memory allocation fails, then there is a possible null pointer dereference: tab [nullPointerOutOfMemory] stk/src/pareto.h:181:31: note: Assuming allocation function fails stk/src/pareto.h:181:11: note: Assignment 'tab=(struct T*)malloc(n*sizeof(struct T))', assigned value is 0 stk/src/pareto.h:182:22: note: Calling function '__init_tab__', 2nd argument 'tab' value is 0 stk/src/pareto.h:286:9: note: Null pointer dereference stk/src/pareto.h:287:9: warning: If memory allocation fails, then there is a possible null pointer dereference: tab [nullPointerOutOfMemory] stk/src/pareto.h:181:31: note: Assuming allocation function fails stk/src/pareto.h:181:11: note: Assignment 'tab=(struct T*)malloc(n*sizeof(struct T))', assigned value is 0 stk/src/pareto.h:182:22: note: Calling function '__init_tab__', 2nd argument 'tab' value is 0 stk/src/pareto.h:287:9: note: Null pointer dereference stk/src/pareto.h:288:9: warning: If memory allocation fails, then there is a possible null pointer dereference: tab [nullPointerOutOfMemory] stk/src/pareto.h:181:31: note: Assuming allocation function fails stk/src/pareto.h:181:11: note: Assignment 'tab=(struct T*)malloc(n*sizeof(struct T))', assigned value is 0 stk/src/pareto.h:182:22: note: Calling function '__init_tab__', 2nd argument 'tab' value is 0 stk/src/pareto.h:288:9: note: Null pointer dereference stk/src/pareto.h:198:44: error: If memory allocation fails: pointer addition with NULL pointer. [nullPointerArithmeticOutOfMemory] stk/src/pareto.h:181:31: note: Assuming allocation function fails stk/src/pareto.h:181:11: note: Assignment 'tab=(struct T*)malloc(n*sizeof(struct T))', assigned value is 0 stk/src/pareto.h:198:44: note: Null pointer addition stk/src/pareto.h:198:53: error: If memory allocation fails: pointer addition with NULL pointer. [nullPointerArithmeticOutOfMemory] stk/src/pareto.h:181:31: note: Assuming allocation function fails stk/src/pareto.h:181:11: note: Assignment 'tab=(struct T*)malloc(n*sizeof(struct T))', assigned value is 0 stk/src/pareto.h:198:53: note: Null pointer addition stk/src/pareto.h:156:34: style:inconclusive: Function 'pareto_find' argument 2 names different: declaration 'idx1' definition 'ndpos'. [funcArgNamesDifferent] stk/src/pareto.h:52:18: note: Function 'pareto_find' argument 2 names different: declaration 'idx1' definition 'ndpos'. stk/src/pareto.h:156:34: note: Function 'pareto_find' argument 2 names different: declaration 'idx1' definition 'ndpos'. stk/src/pareto.h:156:46: style:inconclusive: Function 'pareto_find' argument 3 names different: declaration 'idx2' definition 'drank'. [funcArgNamesDifferent] stk/src/pareto.h:52:29: note: Function 'pareto_find' argument 3 names different: declaration 'idx2' definition 'drank'. stk/src/pareto.h:156:46: note: Function 'pareto_find' argument 3 names different: declaration 'idx2' definition 'drank'. stk/src/stk_isdominated_mex.c:55:13: style: Variable 'xa' can be declared as pointer to const [constVariablePointer] stk/src/stk_isdominated_mex.c:55:18: style: Variable 'xb' can be declared as pointer to const [constVariablePointer] stk/src/pareto.h:133:28: style: Parameter 'x' can be declared as pointer to const [constParameterPointer] stk/src/pareto.h:156:26: style: Parameter 'x' can be declared as pointer to const [constParameterPointer] stk/src/stk_paretofind_mex.c:75:48: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable mxREAL [valueFlowBailoutIncompleteVar] stk/src/stk_dominatedhv_mex.c:124:18: style: Local variable 'sign' shadows outer argument [shadowArgument] stk/src/stk_dominatedhv_mex.c:83:39: note: Shadowed declaration stk/src/stk_dominatedhv_mex.c:124:18: note: Shadow variable stk/src/stk_dominatedhv_mex.c:125:18: style: Local variable 'xmin' shadows outer argument [shadowArgument] stk/src/stk_dominatedhv_mex.c:83:55: note: Shadowed declaration stk/src/stk_dominatedhv_mex.c:125:18: note: Shadow variable stk/src/stk_dominatedhv_mex.c:126:18: style: Local variable 'xmax' shadows outer argument [shadowArgument] stk/src/stk_dominatedhv_mex.c:83:71: note: Shadowed declaration stk/src/stk_dominatedhv_mex.c:126:18: note: Shadow variable stk/src/stk_dominatedhv_mex.c:44:11: style: Variable 'data' can be declared as pointer to const [constVariablePointer] stk/src/stk_sampling_vdc_rr2.c:111:38: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable mxREAL [valueFlowBailoutIncompleteVar] stk/src/stk_sampling_vdc_rr2.c:303:10: style: Checking if unsigned expression 'b' is less than zero. [unsignedLessThanZero] stk/src/stk_sampling_vdc_rr2.c:303:22: style: Checking if unsigned expression 'n' is less than zero. [unsignedLessThanZero] stk/src/stk_sampling_sobol_mex.c:120:41: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable mxREAL [valueFlowBailoutIncompleteVar] stk/src/stk_sampling_vdc_rr2.c:136:31: style:inconclusive: Function 'vanDerCorput_RR2' argument 2 names different: declaration 'n' definition 'N'. [funcArgNamesDifferent] stk/src/stk_sampling_vdc_rr2.c:48:55: note: Function 'vanDerCorput_RR2' argument 2 names different: declaration 'n' definition 'N'. stk/src/stk_sampling_vdc_rr2.c:136:31: note: Function 'vanDerCorput_RR2' argument 2 names different: declaration 'n' definition 'N'. stk/src/stk_sampling_vdc_rr2.c:136:42: style:inconclusive: Function 'vanDerCorput_RR2' argument 3 names different: declaration 'h' definition 'result'. [funcArgNamesDifferent] stk/src/stk_sampling_vdc_rr2.c:48:66: note: Function 'vanDerCorput_RR2' argument 3 names different: declaration 'h' definition 'result'. stk/src/stk_sampling_vdc_rr2.c:136:42: note: Function 'vanDerCorput_RR2' argument 3 names different: declaration 'h' definition 'result'. stk/src/stk_sampling_vdc_rr2.c:220:23: style:inconclusive: Function 'construct_permutRR' argument 2 names different: declaration 'permut' definition 'pi_b'. [funcArgNamesDifferent] stk/src/stk_sampling_vdc_rr2.c:52:49: note: Function 'construct_permutRR' argument 2 names different: declaration 'permut' definition 'pi_b'. stk/src/stk_sampling_vdc_rr2.c:220:23: note: Function 'construct_permutRR' argument 2 names different: declaration 'permut' definition 'pi_b'. stk/src/stk_sampling_vdc_rr2.c:330:7: style: Parameter 'digits' can be declared as pointer to const [constParameterPointer] stk/src/stk_sampling_sobol_mex.c:228:32: style:inconclusive: Function 'nlopt_sobol_gen' argument 1 names different: declaration 's' definition 'sd'. [funcArgNamesDifferent] stk/src/stk_sampling_sobol_mex.c:52:41: note: Function 'nlopt_sobol_gen' argument 1 names different: declaration 's' definition 'sd'. stk/src/stk_sampling_sobol_mex.c:228:32: note: Function 'nlopt_sobol_gen' argument 1 names different: declaration 's' definition 'sd'. diff: 2.17.0 stk/src/pareto.h:198:44: error: If memory allocation fail: pointer addition with NULL pointer. [nullPointerArithmeticOutOfMemory] stk/src/pareto.h:181:31: note: Assuming allocation function fails stk/src/pareto.h:181:11: note: Assignment 'tab=(struct T*)malloc(n*sizeof(struct T))', assigned value is 0 stk/src/pareto.h:198:44: note: Null pointer addition head stk/src/pareto.h:198:44: error: If memory allocation fails: pointer addition with NULL pointer. [nullPointerArithmeticOutOfMemory] stk/src/pareto.h:181:31: note: Assuming allocation function fails stk/src/pareto.h:181:11: note: Assignment 'tab=(struct T*)malloc(n*sizeof(struct T))', assigned value is 0 stk/src/pareto.h:198:44: note: Null pointer addition head stk/src/pareto.h:198:53: error: If memory allocation fails: pointer addition with NULL pointer. [nullPointerArithmeticOutOfMemory] stk/src/pareto.h:181:31: note: Assuming allocation function fails stk/src/pareto.h:181:11: note: Assignment 'tab=(struct T*)malloc(n*sizeof(struct T))', assigned value is 0 stk/src/pareto.h:198:53: note: Null pointer addition DONE