2025-05-09 20:56 ftp://ftp.de.debian.org/debian/pool/main/c/coinor-csdp/coinor-csdp_6.2.0.orig.tar.gz cppcheck-options: --library=posix --library=gnu --library=bsd --library=openmp --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: b3c7f00 (2025-05-09 17:59:20 +0200) count: 108 107 elapsed-time: 0.7 0.8 head-timing-info: old-timing-info: head results: Csdp-6.2.0/lib/Fnorm.c:19:29: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable blockcategory [valueFlowBailoutIncompleteVar] Csdp-6.2.0/lib/Fnorm.c:55:29: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable blockcategory [valueFlowBailoutIncompleteVar] Csdp-6.2.0/lib/Fnorm.c:87:29: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable blockcategory [valueFlowBailoutIncompleteVar] Csdp-6.2.0/lib/Fnorm.c:119:29: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable blockcategory [valueFlowBailoutIncompleteVar] Csdp-6.2.0/doc/example.c:102:54: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable blockrec [valueFlowBailoutIncompleteVar] Csdp-6.2.0/example/example.c:102:54: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable blockrec [valueFlowBailoutIncompleteVar] Csdp-6.2.0/lib/add_mat.c:18:29: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable blockcategory [valueFlowBailoutIncompleteVar] Csdp-6.2.0/lib/addscaledmat.c:24:29: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable blockcategory [valueFlowBailoutIncompleteVar] Csdp-6.2.0/lib/allocmat.c:26:54: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable blockrec [valueFlowBailoutIncompleteVar] Csdp-6.2.0/lib/allocmat.c:78:29: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable blockcategory [valueFlowBailoutIncompleteVar] Csdp-6.2.0/lib/calc_pobj.c:24:29: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable blockcategory [valueFlowBailoutIncompleteVar] Csdp-6.2.0/lib/copy_mat.c:18:29: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable blockcategory [valueFlowBailoutIncompleteVar] Csdp-6.2.0/lib/chol.c:105:29: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable blockcategory [valueFlowBailoutIncompleteVar] Csdp-6.2.0/lib/chol.c:133:29: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable blockcategory [valueFlowBailoutIncompleteVar] Csdp-6.2.0/lib/chol.c:175:32: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable blockcategory [valueFlowBailoutIncompleteVar] Csdp-6.2.0/lib/copy_mat.c:13:11: style: Variable 'p' can be declared as pointer to const [constVariablePointer] Csdp-6.2.0/lib/freeprob.c:49:23: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable blocks [valueFlowBailoutIncompleteVar] Csdp-6.2.0/lib/initparams.c:62:22: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable EOF [valueFlowBailoutIncompleteVar] Csdp-6.2.0/lib/initsoln.c:49:26: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable blocks [valueFlowBailoutIncompleteVar] Csdp-6.2.0/lib/easysdp.c:295:25: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable blocks [valueFlowBailoutIncompleteVar] Csdp-6.2.0/lib/easysdp.c:610:22: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable blocks [valueFlowBailoutIncompleteVar] Csdp-6.2.0/lib/easysdp.c:717:23: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable blockcategory [valueFlowBailoutIncompleteVar] Csdp-6.2.0/lib/easysdp.c:774:24: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable blocks [valueFlowBailoutIncompleteVar] Csdp-6.2.0/lib/initsoln.c:32:4: warning: Either the condition 'py0==NULL' is redundant or there is possible null pointer dereference: py0. [nullPointerRedundantCheck] Csdp-6.2.0/lib/initsoln.c:34:11: note: Assuming that condition 'py0==NULL' is not redundant Csdp-6.2.0/lib/initsoln.c:32:4: note: Null pointer dereference Csdp-6.2.0/lib/initsoln.c:14:14: style: Parameter 'a' can be declared as pointer to const [constParameterPointer] Csdp-6.2.0/lib/linesearch.c:60:30: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable blocksize [valueFlowBailoutIncompleteVar] Csdp-6.2.0/lib/initparams.c:49:15: style: Same expression on both sides of '=='. [duplicateExpression] Csdp-6.2.0/lib/initparams.c:86:14: style: Variable 'ret' is reassigned a value before the old one has been used. [redundantAssignment] Csdp-6.2.0/lib/initparams.c:85:14: note: ret is assigned Csdp-6.2.0/lib/initparams.c:86:14: note: ret is overwritten Csdp-6.2.0/lib/initparams.c:104:14: style: Variable 'ret' is reassigned a value before the old one has been used. [redundantAssignment] Csdp-6.2.0/lib/initparams.c:98:14: note: ret is assigned Csdp-6.2.0/lib/initparams.c:104:14: note: ret is overwritten Csdp-6.2.0/lib/initparams.c:109:14: style: Variable 'ret' is reassigned a value before the old one has been used. [redundantAssignment] Csdp-6.2.0/lib/initparams.c:104:14: note: ret is assigned Csdp-6.2.0/lib/initparams.c:109:14: note: ret is overwritten Csdp-6.2.0/lib/make_i.c:17:29: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable blockcategory [valueFlowBailoutIncompleteVar] Csdp-6.2.0/lib/makefill.c:35:28: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable blockcategory [valueFlowBailoutIncompleteVar] Csdp-6.2.0/lib/mat_mult.c:44:29: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable blockcategory [valueFlowBailoutIncompleteVar] Csdp-6.2.0/lib/makefill.c:184:4: warning: Either the condition 'ptr==NULL' is redundant or there is possible null pointer dereference: ptr. [nullPointerRedundantCheck] Csdp-6.2.0/lib/makefill.c:185:12: note: Assuming that condition 'ptr==NULL' is not redundant Csdp-6.2.0/lib/makefill.c:184:4: note: Null pointer dereference Csdp-6.2.0/lib/makefill.c:184:35: warning: Either the condition 'ptr==NULL' is redundant or there is possible null pointer dereference: ptr. [nullPointerRedundantCheck] Csdp-6.2.0/lib/makefill.c:185:12: note: Assuming that condition 'ptr==NULL' is not redundant Csdp-6.2.0/lib/makefill.c:184:35: note: Null pointer dereference Csdp-6.2.0/lib/matvec.c:31:29: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable blockcategory [valueFlowBailoutIncompleteVar] Csdp-6.2.0/lib/mat_multsp.c:78:26: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable blockcategory [valueFlowBailoutIncompleteVar] Csdp-6.2.0/lib/mat_multsp.c:315:26: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable blockcategory [valueFlowBailoutIncompleteVar] Csdp-6.2.0/lib/mat_multsp.c:563:26: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable blockcategory [valueFlowBailoutIncompleteVar] Csdp-6.2.0/lib/op_a.c:31:26: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable blocks [valueFlowBailoutIncompleteVar] Csdp-6.2.0/lib/op_a.c:19:11: style: Variable 'mat' can be declared as pointer to const [constVariablePointer] Csdp-6.2.0/lib/op_a.c:20:11: style: Variable 'vec' can be declared as pointer to const [constVariablePointer] Csdp-6.2.0/lib/op_at.c:34:26: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable blocks [valueFlowBailoutIncompleteVar] Csdp-6.2.0/lib/op_at.c:11:14: style: Parameter 'y' can be declared as pointer to const [constParameterPointer] Csdp-6.2.0/lib/mat_multsp.c:55:7: style: Unused variable: total_threads [unusedVariable] Csdp-6.2.0/lib/mat_multsp.c:56:7: style: Unused variable: thread_num [unusedVariable] Csdp-6.2.0/lib/mat_multsp.c:292:7: style: Unused variable: total_threads [unusedVariable] Csdp-6.2.0/lib/mat_multsp.c:293:7: style: Unused variable: thread_num [unusedVariable] Csdp-6.2.0/lib/packed.c:19:29: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable blockcategory [valueFlowBailoutIncompleteVar] Csdp-6.2.0/lib/packed.c:54:29: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable blockcategory [valueFlowBailoutIncompleteVar] Csdp-6.2.0/lib/packed.c:107:54: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable blockrec [valueFlowBailoutIncompleteVar] Csdp-6.2.0/lib/packed.c:163:29: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable blockcategory [valueFlowBailoutIncompleteVar] Csdp-6.2.0/lib/packed.c:193:29: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable blockcategory [valueFlowBailoutIncompleteVar] Csdp-6.2.0/lib/packed.c:14:11: style: Variable 'p' can be declared as pointer to const [constVariablePointer] Csdp-6.2.0/lib/packed.c:49:11: style: Variable 'p' can be declared as pointer to const [constVariablePointer] Csdp-6.2.0/lib/op_o.c:69:30: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable blockcategory [valueFlowBailoutIncompleteVar] Csdp-6.2.0/lib/readprob.c:177:66: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable blockrec [valueFlowBailoutIncompleteVar] Csdp-6.2.0/lib/readprob.c:794:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable EOF [valueFlowBailoutIncompleteVar] Csdp-6.2.0/lib/readprob.c:831:15: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable EOF [valueFlowBailoutIncompleteVar] Csdp-6.2.0/lib/readprob.c:857:24: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable blocks [valueFlowBailoutIncompleteVar] Csdp-6.2.0/lib/readprob.c:965:24: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable blocks [valueFlowBailoutIncompleteVar] Csdp-6.2.0/lib/easysdp.c:862:56: style:inconclusive: Boolean expression 'p->iindices[j]==p->iindices[j+1]' is used in bitwise operation. Did you mean '&&'? [bitwiseOnBoolean] Csdp-6.2.0/lib/easysdp.c:510:20: warning: Identical inner 'if' condition is always true. [identicalInnerCondition] Csdp-6.2.0/lib/easysdp.c:475:19: note: outer condition: printlevel>=1 Csdp-6.2.0/lib/easysdp.c:510:20: note: identical inner condition: printlevel>=1 Csdp-6.2.0/lib/easysdp.c:602:23: style: Variable 'ptri' can be declared as pointer to const [constVariablePointer] Csdp-6.2.0/lib/easysdp.c:603:23: style: Variable 'ptrj' can be declared as pointer to const [constVariablePointer] Csdp-6.2.0/lib/easysdp.c:654:13: style: Parameter 'A' can be declared as const array [constParameter] Csdp-6.2.0/lib/easysdp.c:680:13: style: Parameter 'A' can be declared as const array [constParameter] Csdp-6.2.0/lib/easysdp.c:770:23: style: Variable 'p' can be declared as pointer to const [constVariablePointer] Csdp-6.2.0/lib/op_o.c:97:8: error: Array 'work[3]' accessed at index 3, which is out of bounds. [arrayIndexOutOfBounds] Csdp-6.2.0/lib/op_o.c:95:16: note: Assignment 'i=1', assigned value is 1 Csdp-6.2.0/lib/op_o.c:97:8: note: Array index out of bounds Csdp-6.2.0/lib/op_o.c:100:8: error: Array 'work[3]' accessed at index 4, which is out of bounds. [arrayIndexOutOfBounds] Csdp-6.2.0/lib/op_o.c:95:16: note: Assignment 'i=1', assigned value is 1 Csdp-6.2.0/lib/op_o.c:100:8: note: Array index out of bounds Csdp-6.2.0/lib/op_o.c:103:12: error: Array 'work[3]' accessed at index 3, which is out of bounds. [arrayIndexOutOfBounds] Csdp-6.2.0/lib/op_o.c:95:16: note: Assignment 'i=1', assigned value is 1 Csdp-6.2.0/lib/op_o.c:103:12: note: Array index out of bounds Csdp-6.2.0/lib/readsol.c:86:31: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable EOF [valueFlowBailoutIncompleteVar] Csdp-6.2.0/lib/readsol.c:12:12: style: Parameter 'fname' can be declared as pointer to const [constParameterPointer] Csdp-6.2.0/lib/readprob.c:595:19: style: Condition 'ret!=0' is always false [knownConditionTrueFalse] Csdp-6.2.0/lib/readprob.c:593:16: note: Calling function 'addentry' returns 0 Csdp-6.2.0/lib/readprob.c:593:16: note: Assignment 'ret=addentry(myconstraints,matno,blkno,indexi,indexj,ent)', assigned value is 0 Csdp-6.2.0/lib/readprob.c:595:19: note: Condition 'ret!=0' is always false Csdp-6.2.0/lib/readprob.c:170:5: warning: If memory allocation fails, then there is a possible null pointer dereference: isdiag [nullPointerOutOfMemory] Csdp-6.2.0/lib/readprob.c:168:23: note: Assuming allocation function fails Csdp-6.2.0/lib/readprob.c:168:10: note: Assignment 'isdiag=(int*)malloc((nblocks+1)*sizeof(int))', assigned value is 0 Csdp-6.2.0/lib/readprob.c:170:5: note: Null pointer dereference Csdp-6.2.0/lib/readprob.c:703:6: warning: If memory allocation fails, then there is a possible null pointer dereference: tempdiag [nullPointerOutOfMemory] Csdp-6.2.0/lib/readprob.c:701:29: note: Assuming allocation function fails Csdp-6.2.0/lib/readprob.c:701:13: note: Assignment 'tempdiag=(double*)malloc((blksz+1)*sizeof(double))', assigned value is 0 Csdp-6.2.0/lib/readprob.c:703:6: note: Null pointer dereference Csdp-6.2.0/lib/sortentries.c:61:26: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable blocks [valueFlowBailoutIncompleteVar] Csdp-6.2.0/lib/readprob.c:19:12: style: Parameter 'fname' can be declared as pointer to const [constParameterPointer] Csdp-6.2.0/lib/readprob.c:794:11: warning: Storing getc() return value in char variable and then comparing with EOF. [checkCastIntToCharAndBack] Csdp-6.2.0/lib/readprob.c:829:4: style: Variable 'k' is assigned a value that is never used. [unreadVariable] Csdp-6.2.0/lib/sortentries.c:30:40: style: Condition '((struct entry*)p1)->indexj>((struct entry*)p2)->indexj' is always true [knownConditionTrueFalse] Csdp-6.2.0/lib/sortentries.c:26:40: note: Assuming that condition '((struct entry*)p1)->indexj==((struct entry*)p2)->indexj' is not redundant Csdp-6.2.0/lib/sortentries.c:30:40: note: Condition '((struct entry*)p1)->indexj>((struct entry*)p2)->indexj' is always true Csdp-6.2.0/lib/sym_mat.c:25:29: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable blockcategory [valueFlowBailoutIncompleteVar] Csdp-6.2.0/lib/trace_prod.c:23:29: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable blockcategory [valueFlowBailoutIncompleteVar] Csdp-6.2.0/lib/user_exit.c:112:14: style: Parameter 'a' can be declared as pointer to const [constParameterPointer] Csdp-6.2.0/lib/user_exit.c:116:31: style: Parameter 'constraints' can be declared as pointer to const [constParameterPointer] Csdp-6.2.0/lib/user_exit.c:118:14: style: Parameter 'y' can be declared as pointer to const [constParameterPointer] Csdp-6.2.0/lib/writeprob.c:43:27: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable blockcategory [valueFlowBailoutIncompleteVar] Csdp-6.2.0/lib/writesol.c:49:29: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable blockcategory [valueFlowBailoutIncompleteVar] Csdp-6.2.0/lib/writeprob.c:10:12: style: Parameter 'fname' can be declared as pointer to const [constParameterPointer] Csdp-6.2.0/lib/writeprob.c:14:14: style: Parameter 'a' can be declared as pointer to const [constParameterPointer] Csdp-6.2.0/lib/writeprob.c:21:23: style: Variable 'p' can be declared as pointer to const [constVariablePointer] Csdp-6.2.0/lib/writesol.c:10:12: style: Parameter 'fname' can be declared as pointer to const [constParameterPointer] Csdp-6.2.0/lib/writesol.c:14:14: style: Parameter 'y' can be declared as pointer to const [constParameterPointer] Csdp-6.2.0/lib/zero_mat.c:25:29: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable blockcategory [valueFlowBailoutIncompleteVar] Csdp-6.2.0/theta/graphtoprob.c:74:35: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable blockrec [valueFlowBailoutIncompleteVar] Csdp-6.2.0/theta/complement.c:51:6: style: Variable 'ret' is reassigned a value before the old one has been used. [redundantAssignment] Csdp-6.2.0/theta/complement.c:50:6: note: ret is assigned Csdp-6.2.0/theta/complement.c:51:6: note: ret is overwritten Csdp-6.2.0/theta/complement.c:17:12: style: Parameter 'argv' can be declared as const array [constParameter] Csdp-6.2.0/theta/complement.c:51:6: style: Variable 'ret' is assigned a value that is never used. [unreadVariable] Csdp-6.2.0/theta/rand_graph.c:48:12: style: Condition 'argc>=4' is always true [knownConditionTrueFalse] Csdp-6.2.0/theta/rand_graph.c:43:12: note: Assuming that condition 'argc<=3' is not redundant Csdp-6.2.0/theta/rand_graph.c:48:12: note: Condition 'argc>=4' is always true Csdp-6.2.0/theta/rand_graph.c:28:12: style: Parameter 'argv' can be declared as const array [constParameter] Csdp-6.2.0/theta/theta.c:76:35: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable blockrec [valueFlowBailoutIncompleteVar] Csdp-6.2.0/theta/theta.c:27:12: style: Parameter 'argv' can be declared as const array [constParameter] Csdp-6.2.0/lib/sdp.c:402:14: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] Csdp-6.2.0/lib/sdp.c:1088:5: style:inconclusive: Found duplicate branches for 'if' and 'else'. [duplicateBranch] Csdp-6.2.0/lib/sdp.c:1092:5: note: Found duplicate branches for 'if' and 'else'. Csdp-6.2.0/lib/sdp.c:1088:5: note: Found duplicate branches for 'if' and 'else'. Csdp-6.2.0/lib/sdp.c:1097:5: style:inconclusive: Found duplicate branches for 'if' and 'else'. [duplicateBranch] Csdp-6.2.0/lib/sdp.c:1101:5: note: Found duplicate branches for 'if' and 'else'. Csdp-6.2.0/lib/sdp.c:1097:5: note: Found duplicate branches for 'if' and 'else'. Csdp-6.2.0/lib/sdp.c:1436:9: style: Variable 'info' is reassigned a value before the old one has been used. [redundantAssignment] Csdp-6.2.0/lib/sdp.c:961:10: note: info is assigned Csdp-6.2.0/lib/sdp.c:1436:9: note: info is overwritten Csdp-6.2.0/lib/sdp.c:2205:14: style: Variable 'probpfeas' is assigned a value that is never used. [unreadVariable] Csdp-6.2.0/lib/sdp.c:2208:14: style: Variable 'probdfeas' is assigned a value that is never used. [unreadVariable] diff: head Csdp-6.2.0/lib/makefill.c:184:35: warning: Either the condition 'ptr==NULL' is redundant or there is possible null pointer dereference: ptr. [nullPointerRedundantCheck] Csdp-6.2.0/lib/makefill.c:185:12: note: Assuming that condition 'ptr==NULL' is not redundant Csdp-6.2.0/lib/makefill.c:184:35: note: Null pointer dereference DONE