2026-05-03 06:08 ftp://ftp.de.debian.org/debian/pool/main/libq/libquantum/libquantum_1.1.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 -j1 platform: Linux-6.8.0-1047-aws-aarch64-with-glibc2.35 python: 3.10.12 client-version: 1.4.0 compiler: g++ (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0 cppcheck: head 2.20.0 head-info: e5c4a73 (2026-05-01 11:10:43 +0200) count: 80 76 elapsed-time: 0.9 0.8 head-timing-info: old-timing-info: head results: libquantum-1.1.1/complex.c:55:21: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable IMAGINARY [valueFlowBailoutIncompleteVar] libquantum-1.1.1/decoherence.c:105:4: warning: If memory allocation fails, then there is a possible null pointer dereference: nrands [nullPointerOutOfMemory] libquantum-1.1.1/decoherence.c:84:22: note: Assuming allocation function fails libquantum-1.1.1/decoherence.c:84:22: note: Assignment 'nrands=calloc(reg->width,sizeof(float))', assigned value is 0 libquantum-1.1.1/decoherence.c:105:4: note: Null pointer dereference libquantum-1.1.1/qureg.h:170:49: style: Parameter 'bits' can be declared as pointer to const [constParameterPointer] libquantum-1.1.1/density.c:37:40: style: Parameter 'prob' can be declared as pointer to const [constParameterPointer] libquantum-1.1.1/density.c:109:12: style: Variable 'p0' is assigned a value that is never used. [unreadVariable] libquantum-1.1.1/energy.c:305:21: debug: Function::addArguments found argument 'MAX_UNSIGNED' with varid 0. [varid0] libquantum-1.1.1/energy.c:44:40: debug: Function::addArguments found argument 'MAX_UNSIGNED' with varid 0. [varid0] libquantum-1.1.1/energy.c:113:31: debug: Function::addArguments found argument 'MAX_UNSIGNED' with varid 0. [varid0] libquantum-1.1.1/energy.c:270:38: debug: Function::addArguments found argument 'MAX_UNSIGNED' with varid 0. [varid0] libquantum-1.1.1/energy.c:47:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable DBL_MAX [valueFlowBailoutIncompleteVar] libquantum-1.1.1/energy.c:273:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable DBL_MAX [valueFlowBailoutIncompleteVar] libquantum-1.1.1/energy.c:311:30: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable H [valueFlowBailoutIncompleteVar] libquantum-1.1.1/energy.c:305:21: style:inconclusive: Function 'quantum_groundstate' argument 3 names different: declaration '' definition 'MAX_UNSIGNED'. [funcArgNamesDifferentUnnamed] libquantum-1.1.1/energy.c:47:12: style: Variable 'E0' is assigned a value that is never used. [unreadVariable] libquantum-1.1.1/error.c:30:31: debug: Function::addArguments found argument 'int' with varid 0. [varid0] libquantum-1.1.1/error.c:34:6: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable f [valueFlowBailoutIncompleteVar] libquantum-1.1.1/error.c:86:14: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] libquantum-1.1.1/error.c:30:31: style:inconclusive: Function 'quantum_error_handler' argument 1 names different: declaration '' definition 'int'. [funcArgNamesDifferentUnnamed] libquantum-1.1.1/gates.c:206:23: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable IMAGINARY [valueFlowBailoutIncompleteVar] libquantum-1.1.1/gates.c:336:42: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable MAX_UNSIGNED [valueFlowBailoutIncompleteVar] libquantum-1.1.1/gates.c:515:41: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable MAX_UNSIGNED [valueFlowBailoutIncompleteVar] libquantum-1.1.1/gates.c:674:51: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable IMAGINARY [valueFlowBailoutIncompleteVar] libquantum-1.1.1/gates.c:129:5: warning: If memory allocation fails, then there is a possible null pointer dereference: controls [nullPointerOutOfMemory] libquantum-1.1.1/gates.c:119:20: note: Assuming allocation function fails libquantum-1.1.1/gates.c:119:20: note: Assignment 'controls=malloc(controlling*sizeof(int))', assigned value is 0 libquantum-1.1.1/gates.c:129:5: note: Null pointer dereference libquantum-1.1.1/gates.c:141:43: warning: If memory allocation fails, then there is a possible null pointer dereference: controls [nullPointerOutOfMemory] libquantum-1.1.1/gates.c:119:20: note: Assuming allocation function fails libquantum-1.1.1/gates.c:119:20: note: Assignment 'controls=malloc(controlling*sizeof(int))', assigned value is 0 libquantum-1.1.1/gates.c:141:43: note: Null pointer dereference libquantum-1.1.1/gates.c:368:11: warning: If memory allocation fails, then there is a possible null pointer dereference: done [nullPointerOutOfMemory] libquantum-1.1.1/gates.c:353:16: note: Assuming allocation function fails libquantum-1.1.1/gates.c:353:16: note: Assignment 'done=calloc(reg->size+addsize,sizeof(char))', assigned value is 0 libquantum-1.1.1/gates.c:368:11: note: Null pointer dereference libquantum-1.1.1/gates.c:548:11: warning: If memory allocation fails, then there is a possible null pointer dereference: done [nullPointerOutOfMemory] libquantum-1.1.1/gates.c:530:16: note: Assuming allocation function fails libquantum-1.1.1/gates.c:530:16: note: Assignment 'done=calloc(reg->size+addsize,sizeof(char))', assigned value is 0 libquantum-1.1.1/gates.c:548:11: note: Null pointer dereference libquantum-1.1.1/gates.c:311:24: style: Variable 'tnot' is assigned a value that is never used. [unreadVariable] libquantum-1.1.1/ising.c:137:31: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable quantum_reg [valueFlowBailoutIncompleteVar] libquantum-1.1.1/lapack.c:43:42: style: Parameter 'reg0' can be declared as pointer to const [constParameterPointer] libquantum-1.1.1/lapack.c:43:61: style: Parameter 'regt' can be declared as pointer to const [constParameterPointer] libquantum-1.1.1/lapack.c:44:18: style: Parameter 'tmp1' can be declared as pointer to const [constParameterPointer] libquantum-1.1.1/lapack.c:44:37: style: Parameter 'tmp2' can be declared as pointer to const [constParameterPointer] libquantum-1.1.1/matrix.c:55:36: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable COMPLEX_FLOAT [valueFlowBailoutIncompleteVar] libquantum-1.1.1/matrix.c:82:26: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable COMPLEX_FLOAT [valueFlowBailoutIncompleteVar] libquantum-1.1.1/matrix.c:158:33: style: Parameter 'm' can be declared as pointer to const [constParameterPointer] libquantum-1.1.1/matrix.c:105:4: style: Variable 'z' is assigned a value that is never used. [unreadVariable] libquantum-1.1.1/measure.c:43:28: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable RAND_MAX [valueFlowBailoutIncompleteVar] libquantum-1.1.1/measure.c:186:35: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable MAX_UNSIGNED [valueFlowBailoutIncompleteVar] libquantum-1.1.1/objcode.c:64:17: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable MAX_UNSIGNED [valueFlowBailoutIncompleteVar] libquantum-1.1.1/objcode.c:106:17: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable MAX_UNSIGNED [valueFlowBailoutIncompleteVar] libquantum-1.1.1/objcode.c:183:25: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable MAX_UNSIGNED [valueFlowBailoutIncompleteVar] libquantum-1.1.1/objcode.c:272:15: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] libquantum-1.1.1/objcode.c:325:15: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] libquantum-1.1.1/objcode.c:95:22: portability:inconclusive: Casting from double * to unsigned char * is not portable due to different binary data representations on different platforms. [invalidPointerCast] libquantum-1.1.1/objcode.c:129:15: portability: Casting between unsigned char * and double * which have an incompatible binary data representation. [invalidPointerCast] libquantum-1.1.1/objcode.c:95:18: style: Variable 'p' can be declared as pointer to const [constVariablePointer] libquantum-1.1.1/objcode.c:101:45: style: Parameter 'buf' can be declared as pointer to const [constParameterPointer] libquantum-1.1.1/objcode.c:114:37: style: Parameter 'buf' can be declared as pointer to const [constParameterPointer] libquantum-1.1.1/objcode.c:129:11: style: Variable 'd' can be declared as pointer to const [constVariablePointer] libquantum-1.1.1/objcode.c:266:29: style: Parameter 'file' can be declared as pointer to const [constParameterPointer] libquantum-1.1.1/objcode.c:303:28: style: Parameter 'file' can be declared as pointer to const [constParameterPointer] libquantum-1.1.1/objcode.c:312:27: style: Parameter 'file' can be declared as pointer to const [constParameterPointer] libquantum-1.1.1/qtime.c:40:20: debug: Function::addArguments found argument 'MAX_UNSIGNED' with varid 0. [varid0] libquantum-1.1.1/qtime.c:117:21: debug: Function::addArguments found argument 'MAX_UNSIGNED' with varid 0. [varid0] libquantum-1.1.1/qtime.c:56:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable IMAGINARY [valueFlowBailoutIncompleteVar] libquantum-1.1.1/qtime.c:136:32: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable H [valueFlowBailoutIncompleteVar] libquantum-1.1.1/qtime.c:40:20: style:inconclusive: Function 'quantum_rk4' argument 4 names different: declaration '' definition 'MAX_UNSIGNED'. [funcArgNamesDifferentUnnamed] libquantum-1.1.1/qtime.c:117:21: style:inconclusive: Function 'quantum_rk4a' argument 5 names different: declaration '' definition 'MAX_UNSIGNED'. [funcArgNamesDifferentUnnamed] libquantum-1.1.1/quobdump.c:50:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] libquantum-1.1.1/quobdump.c:44:12: warning: If memory allocation fails, then there is a possible null pointer dereference: envstr [nullPointerOutOfMemory] libquantum-1.1.1/quobdump.c:42:18: note: Assuming allocation function fails libquantum-1.1.1/quobdump.c:42:18: note: Assignment 'envstr=malloc(strlen(argv[1])+20)', assigned value is 0 libquantum-1.1.1/quobdump.c:44:12: note: Null pointer dereference libquantum-1.1.1/quobprint.c:71:15: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] libquantum-1.1.1/qureg.c:713:36: debug: Function::addArguments found argument 'MAX_UNSIGNED' with varid 0. [varid0] libquantum-1.1.1/qureg.c:62:39: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable COMPLEX_FLOAT [valueFlowBailoutIncompleteVar] libquantum-1.1.1/qureg.c:109:32: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable MAX_UNSIGNED [valueFlowBailoutIncompleteVar] libquantum-1.1.1/qureg.c:163:36: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable COMPLEX_FLOAT [valueFlowBailoutIncompleteVar] libquantum-1.1.1/qureg.c:188:36: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable COMPLEX_FLOAT [valueFlowBailoutIncompleteVar] libquantum-1.1.1/qureg.c:234:38: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable COMPLEX_FLOAT [valueFlowBailoutIncompleteVar] libquantum-1.1.1/qureg.c:252:38: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable COMPLEX_FLOAT [valueFlowBailoutIncompleteVar] libquantum-1.1.1/qureg.c:272:45: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable COMPLEX_FLOAT [valueFlowBailoutIncompleteVar] libquantum-1.1.1/qureg.c:395:43: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable COMPLEX_FLOAT [valueFlowBailoutIncompleteVar] libquantum-1.1.1/qureg.c:456:39: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable COMPLEX_FLOAT [valueFlowBailoutIncompleteVar] libquantum-1.1.1/qureg.c:599:62: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable COMPLEX_FLOAT [valueFlowBailoutIncompleteVar] libquantum-1.1.1/qureg.c:665:33: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable COMPLEX_FLOAT [valueFlowBailoutIncompleteVar] libquantum-1.1.1/qureg.c:725:45: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable COMPLEX_FLOAT [valueFlowBailoutIncompleteVar] libquantum-1.1.1/qureg.c:429:28: style:inconclusive: Function 'quantum_state_collapse' argument 1 names different: declaration 'bit' definition 'pos'. [funcArgNamesDifferent] libquantum-1.1.1/qureg.h:67:47: note: Function 'quantum_state_collapse' argument 1 names different: declaration 'bit' definition 'pos'. libquantum-1.1.1/qureg.c:429:28: note: Function 'quantum_state_collapse' argument 1 names different: declaration 'bit' definition 'pos'. libquantum-1.1.1/qureg.c:713:36: style:inconclusive: Function 'quantum_matrix_qureg' argument 1 names different: declaration '' definition 'MAX_UNSIGNED'. [funcArgNamesDifferentUnnamed] libquantum-1.1.1/qureg.c:266:33: style: Parameter 'src' can be declared as pointer to const [constParameterPointer] libquantum-1.1.1/qureg.c:434:20: style: Variable 'lpat' is assigned a value that is never used. [unreadVariable] libquantum-1.1.1/qureg.c:434:28: style: Variable 'rpat' is assigned a value that is never used. [unreadVariable] libquantum-1.1.1/version.c:29:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PACKAGE_VERSION [valueFlowBailoutIncompleteVar] diff: head libquantum-1.1.1/energy.c:305:21: style:inconclusive: Function 'quantum_groundstate' argument 3 names different: declaration '' definition 'MAX_UNSIGNED'. [funcArgNamesDifferentUnnamed] head libquantum-1.1.1/error.c:30:31: style:inconclusive: Function 'quantum_error_handler' argument 1 names different: declaration '' definition 'int'. [funcArgNamesDifferentUnnamed] head libquantum-1.1.1/qtime.c:117:21: style:inconclusive: Function 'quantum_rk4a' argument 5 names different: declaration '' definition 'MAX_UNSIGNED'. [funcArgNamesDifferentUnnamed] head libquantum-1.1.1/qtime.c:40:20: style:inconclusive: Function 'quantum_rk4' argument 4 names different: declaration '' definition 'MAX_UNSIGNED'. [funcArgNamesDifferentUnnamed] 2.20.0 libquantum-1.1.1/quobdump.c:46:10: warning:inconclusive: If memory allocation fails, then there is a possible null pointer dereference: envstr [nullPointerOutOfMemory] libquantum-1.1.1/quobdump.c:42:18: note: Assuming allocation function fails libquantum-1.1.1/quobdump.c:42:18: note: Assignment 'envstr=malloc(strlen(argv[1])+20)', assigned value is 0 libquantum-1.1.1/quobdump.c:46:10: note: Null pointer dereference head libquantum-1.1.1/qureg.c:713:36: style:inconclusive: Function 'quantum_matrix_qureg' argument 1 names different: declaration '' definition 'MAX_UNSIGNED'. [funcArgNamesDifferentUnnamed] DONE