2024-04-24 20:31 ftp://ftp.de.debian.org/debian/pool/main/g/gmp-ecm/gmp-ecm_7.0.5+ds.orig.tar.xz 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 -D__GNUC__ --platform=unix64 -j1 platform: Linux-5.15.0-105-generic-x86_64-with-glibc2.35 python: 3.10.12 client-version: 1.3.56 compiler: g++ (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0 cppcheck: head 2.14.0 head-info: 94f28a2 (2024-04-24 20:47:54 +0200) count: 107 107 elapsed-time: 19.2 18.5 head-timing-info: old-timing-info: head results: gmp-ecm-7.0.5+ds/sp.h:121:0: error: #error "invalid choice of small prime size" [preprocessorErrorDirective] gmp-ecm-7.0.5+ds/aprtcle/aprcl.c:126:67: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] gmp-ecm-7.0.5+ds/aprtcle/mpz_aprcl.c:220:32: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable mpz_t [valueFlowBailoutIncompleteVar] gmp-ecm-7.0.5+ds/aprtcle/mpz_aprcl.c:613:20: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] gmp-ecm-7.0.5+ds/bench_mulredc.c:94:47: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable CLOCKS_PER_SEC [valueFlowBailoutIncompleteVar] gmp-ecm-7.0.5+ds/bench_mulredc.c:120:37: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable mp_limb_t [valueFlowBailoutIncompleteVar] gmp-ecm-7.0.5+ds/bench_mulredc.c:760:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] gmp-ecm-7.0.5+ds/bench_mulredc.c:105:18: style: Variable 'tmul_best' is assigned a value that is never used. [unreadVariable] gmp-ecm-7.0.5+ds/bench_mulredc.c:105:40: style: Variable 'tsqr_best' is assigned a value that is never used. [unreadVariable] gmp-ecm-7.0.5+ds/bench_mulredc.c:105:63: style: Variable 'tredc_best' is assigned a value that is never used. [unreadVariable] gmp-ecm-7.0.5+ds/bench_mulredc.c:122:28: style: Variable 'z' is allocated memory that is never used. [unusedAllocatedMemory] gmp-ecm-7.0.5+ds/bench_mulredc.c:104:20: style: Unused variable: tredc_1 [unusedVariable] gmp-ecm-7.0.5+ds/bench_mulredc.c:104:29: style: Unused variable: t_mulredc_1 [unusedVariable] gmp-ecm-7.0.5+ds/bench_mulredc.c:104:42: style: Unused variable: t_sqrredc_1 [unusedVariable] gmp-ecm-7.0.5+ds/build.vc12/assembler/test_mulredc.c:98:37: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable mp_limb_t [valueFlowBailoutIncompleteVar] gmp-ecm-7.0.5+ds/build.vc12/assembler/test_mulredc.c:254:25: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] gmp-ecm-7.0.5+ds/build.vc12/assembler/test_mulredc.c:9:26: style: Parameter 'x' can be declared as pointer to const [constParameterPointer] gmp-ecm-7.0.5+ds/build.vc12/getopt.c:707:17: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] gmp-ecm-7.0.5+ds/build.vc12/getopt.c:887:11: style: Variable 'temp' can be declared as pointer to const [constVariablePointer] gmp-ecm-7.0.5+ds/build.vc12/getrusage.c:38:9: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] gmp-ecm-7.0.5+ds/build.vc12/getrusage.c:34:12: style: Variable 'cb' is assigned a value that is never used. [unreadVariable] gmp-ecm-7.0.5+ds/build.vc12/gettimeofday.c:34:30: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable _timezone [valueFlowBailoutIncompleteVar] gmp-ecm-7.0.5+ds/build.vc12/gettimeofday.c:18:21: style: Variable 'li.LowPart' is assigned a value that is never used. [unreadVariable] gmp-ecm-7.0.5+ds/build.vc12/gettimeofday.c:19:21: style: Variable 'li.HighPart' is assigned a value that is never used. [unreadVariable] gmp-ecm-7.0.5+ds/build.vc14/assembler/test_mulredc.c:98:37: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable mp_limb_t [valueFlowBailoutIncompleteVar] gmp-ecm-7.0.5+ds/build.vc14/assembler/test_mulredc.c:254:25: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] gmp-ecm-7.0.5+ds/build.vc14/assembler/test_mulredc.c:9:26: style: Parameter 'x' can be declared as pointer to const [constParameterPointer] gmp-ecm-7.0.5+ds/build.vc14/getopt.c:707:17: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] gmp-ecm-7.0.5+ds/build.vc14/getopt.c:887:11: style: Variable 'temp' can be declared as pointer to const [constVariablePointer] gmp-ecm-7.0.5+ds/build.vc14/getrusage.c:38:9: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] gmp-ecm-7.0.5+ds/build.vc14/getrusage.c:34:12: style: Variable 'cb' is assigned a value that is never used. [unreadVariable] gmp-ecm-7.0.5+ds/build.vc14/gettimeofday.c:34:30: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable _timezone [valueFlowBailoutIncompleteVar] gmp-ecm-7.0.5+ds/build.vc14/gettimeofday.c:18:21: style: Variable 'li.LowPart' is assigned a value that is never used. [unreadVariable] gmp-ecm-7.0.5+ds/build.vc14/gettimeofday.c:19:21: style: Variable 'li.HighPart' is assigned a value that is never used. [unreadVariable] gmp-ecm-7.0.5+ds/build.vc15/assembler/test_mulredc.c:98:37: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable mp_limb_t [valueFlowBailoutIncompleteVar] gmp-ecm-7.0.5+ds/build.vc15/assembler/test_mulredc.c:254:25: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] gmp-ecm-7.0.5+ds/build.vc15/assembler/test_mulredc.c:9:26: style: Parameter 'x' can be declared as pointer to const [constParameterPointer] gmp-ecm-7.0.5+ds/build.vc15/getopt.c:707:17: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] gmp-ecm-7.0.5+ds/build.vc15/getopt.c:887:11: style: Variable 'temp' can be declared as pointer to const [constVariablePointer] gmp-ecm-7.0.5+ds/build.vc15/getrusage.c:38:9: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] gmp-ecm-7.0.5+ds/build.vc15/getrusage.c:34:12: style: Variable 'cb' is assigned a value that is never used. [unreadVariable] gmp-ecm-7.0.5+ds/build.vc15/gettimeofday.c:34:30: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable _timezone [valueFlowBailoutIncompleteVar] gmp-ecm-7.0.5+ds/build.vc15/gettimeofday.c:18:21: style: Variable 'li.LowPart' is assigned a value that is never used. [unreadVariable] gmp-ecm-7.0.5+ds/build.vc15/gettimeofday.c:19:21: style: Variable 'li.HighPart' is assigned a value that is never used. [unreadVariable] gmp-ecm-7.0.5+ds/build.vs/assembler/test_mulredc.c:98:37: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable mp_limb_t [valueFlowBailoutIncompleteVar] gmp-ecm-7.0.5+ds/build.vs/assembler/test_mulredc.c:254:25: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] gmp-ecm-7.0.5+ds/build.vs/assembler/test_mulredc.c:9:26: style: Parameter 'x' can be declared as pointer to const [constParameterPointer] gmp-ecm-7.0.5+ds/build.vs/getopt.c:707:17: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] gmp-ecm-7.0.5+ds/build.vs/getopt.c:887:11: style: Variable 'temp' can be declared as pointer to const [constVariablePointer] gmp-ecm-7.0.5+ds/build.vs/getrusage.c:38:9: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] gmp-ecm-7.0.5+ds/build.vs/getrusage.c:34:12: style: Variable 'cb' is assigned a value that is never used. [unreadVariable] gmp-ecm-7.0.5+ds/build.vs/gettimeofday.c:34:30: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable _timezone [valueFlowBailoutIncompleteVar] gmp-ecm-7.0.5+ds/build.vs/gettimeofday.c:18:21: style: Variable 'li.LowPart' is assigned a value that is never used. [unreadVariable] gmp-ecm-7.0.5+ds/build.vs/gettimeofday.c:19:21: style: Variable 'li.HighPart' is assigned a value that is never used. [unreadVariable] gmp-ecm-7.0.5+ds/candi.c:142:22: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] gmp-ecm-7.0.5+ds/candi.c:90:9: style:inconclusive: Function 'mpcandi_t_add_candidate' argument 4 names different: declaration 'bPrp' definition 'primetest'. [funcArgNamesDifferent] gmp-ecm-7.0.5+ds/ecm-ecm.h:146:78: note: Function 'mpcandi_t_add_candidate' argument 4 names different: declaration 'bPrp' definition 'primetest'. gmp-ecm-7.0.5+ds/candi.c:90:9: note: Function 'mpcandi_t_add_candidate' argument 4 names different: declaration 'bPrp' definition 'primetest'. gmp-ecm-7.0.5+ds/ecmfactor.c:65:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] gmp-ecm-7.0.5+ds/eval.c:106:19: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable EOF [valueFlowBailoutIncompleteVar] gmp-ecm-7.0.5+ds/eval.c:319:20: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] gmp-ecm-7.0.5+ds/eval.c:506:20: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] gmp-ecm-7.0.5+ds/eval.c:871:14: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] gmp-ecm-7.0.5+ds/eval.c:91:39: style:inconclusive: Function 'eval' argument 3 names different: declaration 'bPrp' definition 'primetest'. [funcArgNamesDifferent] gmp-ecm-7.0.5+ds/ecm-ecm.h:137:39: note: Function 'eval' argument 3 names different: declaration 'bPrp' definition 'primetest'. gmp-ecm-7.0.5+ds/eval.c:91:39: note: Function 'eval' argument 3 names different: declaration 'bPrp' definition 'primetest'. gmp-ecm-7.0.5+ds/eval.c:192:8: style: Local variable 'cp' shadows outer argument [shadowArgument] gmp-ecm-7.0.5+ds/eval.c:166:35: note: Shadowed declaration gmp-ecm-7.0.5+ds/eval.c:192:8: note: Shadow variable gmp-ecm-7.0.5+ds/eval.c:153:10: style: Variable 'cpTmpExpr' can be declared as pointer to const [constVariablePointer] gmp-ecm-7.0.5+ds/eval.c:213:10: style: Variable 'cpTmpExpr' can be declared as pointer to const [constVariablePointer] gmp-ecm-7.0.5+ds/eval.c:843:10: style: Variable 'negate' is assigned a value that is never used. [unreadVariable] gmp-ecm-7.0.5+ds/nodist/countsmooth.c:353:44: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable mpz_t [valueFlowBailoutIncompleteVar] gmp-ecm-7.0.5+ds/nodist/countsmooth.c:604:20: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] gmp-ecm-7.0.5+ds/nodist/countsmooth.c:307:9: style: Obsolescent function 'index' called. It is recommended to use 'strchr' instead. [prohibitedindexCalled] gmp-ecm-7.0.5+ds/nodist/countsmooth.c:684:19: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] gmp-ecm-7.0.5+ds/nodist/countsmooth.c:684:19: warning: %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] gmp-ecm-7.0.5+ds/nodist/countsmooth.c:716:17: warning: %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] gmp-ecm-7.0.5+ds/nodist/countsmooth.c:726:19: warning: %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] gmp-ecm-7.0.5+ds/nodist/countsmooth.c:744:23: warning: %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] gmp-ecm-7.0.5+ds/nodist/countsmooth.c:761:27: warning: %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] gmp-ecm-7.0.5+ds/nodist/countsmooth.c:793:3: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] gmp-ecm-7.0.5+ds/nodist/countsmooth.c:793:3: warning: %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] gmp-ecm-7.0.5+ds/nodist/countsmooth.c:793:3: warning: %d in format string (no. 4) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] gmp-ecm-7.0.5+ds/nodist/countsmooth.c:798:5: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] gmp-ecm-7.0.5+ds/nodist/countsmooth.c:266:49: style: Parameter 'parm' can be declared as pointer to const [constParameterPointer] gmp-ecm-7.0.5+ds/nodist/countsmooth.c:282:48: style: Parameter 'parm' can be declared as pointer to const [constParameterPointer] gmp-ecm-7.0.5+ds/nodist/countsmooth.c:298:50: style: Parameter 'parm' can be declared as pointer to const [constParameterPointer] gmp-ecm-7.0.5+ds/nodist/runecm2.c:55:30: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable O_RDONLY [valueFlowBailoutIncompleteVar] gmp-ecm-7.0.5+ds/nodist/runecm2.c:185:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] gmp-ecm-7.0.5+ds/nodist/runecm2.c:206:7: warning: Return value of function pipe() is not used. [ignoredReturnValue] gmp-ecm-7.0.5+ds/nodist/runecm2.c:265:5: style: Obsolescent function 'usleep' called. It is recommended to use 'nanosleep' or 'setitimer' instead. [prohibitedusleepCalled] gmp-ecm-7.0.5+ds/nodist/runecm2.c:268:8: warning: %u in format string (no. 2) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint] gmp-ecm-7.0.5+ds/nodist/runecm2.c:92:16: style: Variable 'p' can be declared as pointer to const [constVariablePointer] gmp-ecm-7.0.5+ds/nodist/runecm2.c:141:9: style: Variable 'tmpdir' can be declared as pointer to const [constVariablePointer] gmp-ecm-7.0.5+ds/resume.c:51:43: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable EOF [valueFlowBailoutIncompleteVar] gmp-ecm-7.0.5+ds/resume.c:80:17: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable EOF [valueFlowBailoutIncompleteVar] gmp-ecm-7.0.5+ds/resume.c:100:45: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable EOF [valueFlowBailoutIncompleteVar] gmp-ecm-7.0.5+ds/resume.c:154:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable ECM_PARAM_SUYAMA [valueFlowBailoutIncompleteVar] gmp-ecm-7.0.5+ds/resume.c:426:17: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable ECM_PM1 [valueFlowBailoutIncompleteVar] gmp-ecm-7.0.5+ds/resume.c:564:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] gmp-ecm-7.0.5+ds/resume.c:676:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] gmp-ecm-7.0.5+ds/resume.c:707:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] gmp-ecm-7.0.5+ds/resume.c:46:29: style: Parameter 's' can be declared as pointer to const [constParameterPointer] gmp-ecm-7.0.5+ds/resume.c:421:9: style: Variable 'uname' can be declared as pointer to const [constVariablePointer] gmp-ecm-7.0.5+ds/resume.c:538:25: style: Parameter 'fn' can be declared as pointer to const [constParameterPointer] gmp-ecm-7.0.5+ds/resume.c:660:24: style: Parameter 'fn' can be declared as pointer to const [constParameterPointer] gmp-ecm-7.0.5+ds/resume.c:689:34: style: Parameter 'fn' can be declared as pointer to const [constParameterPointer] gmp-ecm-7.0.5+ds/resume.c:543:18: style: Variable 'i' is assigned a value that is never used. [unreadVariable] gmp-ecm-7.0.5+ds/test_mulredc.c:19:28: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable GMP_NUMB_BITS [valueFlowBailoutIncompleteVar] gmp-ecm-7.0.5+ds/test_mulredc.c:179:37: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable mp_limb_t [valueFlowBailoutIncompleteVar] gmp-ecm-7.0.5+ds/test_mulredc.c:330:25: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] gmp-ecm-7.0.5+ds/test_mulredc.c:176:44: style: Unused variable: cy2 [unusedVariable] diff: DONE