gmp-6.2.1-8.fc40
List of Defects
Error: COMPILER_WARNING: [#def1]
gmp-6.2.1/conftest.s: scope_hint: Assembler messages
gmp-6.2.1/conftest.s:2: Error: no such instruction: `somelabel'
Error: COMPILER_WARNING: [#def2]
gmp-6.2.1/conftest.s: scope_hint: Assembler messages
gmp-6.2.1/conftest.s:3: Error: unknown pseudo-op: `.def'
Error: COMPILER_WARNING: [#def3]
gmp-6.2.1/conftest.s:4: Error: unknown pseudo-op: `.scl'
Error: COMPILER_WARNING: [#def4]
gmp-6.2.1/conftest.s:5: Error: Missing symbol name in directive
Error: COMPILER_WARNING: [#def5]
gmp-6.2.1/conftest.s:5: Error: unrecognized symbol type "32"
Error: COMPILER_WARNING: [#def6]
gmp-6.2.1/conftest.s:6: Error: unknown pseudo-op: `.endef'
Error: COMPILER_WARNING (CWE-1164): [#def7]
gmp-6.2.1/cxx/ismpf.cc: scope_hint: In function 'std::istream& operator>>(std::istream&, mpf_ptr)'
gmp-6.2.1/cxx/ismpf.cc:139:5: warning[-Wunused-label]: label 'fail' defined but not used
# 139 | fail:
# | ^~~~
# 137| else
# 138| {
# 139|-> fail:
# 140| i.setstate(ios::failbit); // read failed
# 141| }
Error: COMPILER_WARNING (CWE-563): [#def8]
gmp-6.2.1/cxx/osdoprnti.cc: scope_hint: In function 'std::ostream& __gmp_doprnt_integer_ostream(std::ostream&, doprnt_params_t*, char*)'
gmp-6.2.1/cxx/osdoprnti.cc:54:9: warning[-Wunused-but-set-variable]: variable 'ret' set but not used
# 54 | int ret;
# | ^~~
# 52| struct gmp_asprintf_t d;
# 53| char *result;
# 54|-> int ret;
# 55|
# 56| /* don't show leading zeros the way printf does */
Error: CLANG_WARNING: [#def9]
gmp-6.2.1/cxx/osdoprnti.cc:60:3: warning[deadcode.DeadStores]: Value stored to 'ret' is never read
# 58|
# 59| GMP_ASPRINTF_T_INIT (d, &result);
# 60|-> ret = __gmp_doprnt_integer (&__gmp_asprintf_funs_noformat, &d, p, s);
# 61| ASSERT (ret != -1);
# 62| __gmp_asprintf_final (&d);
Error: COMPILER_WARNING (CWE-563): [#def10]
gmp-6.2.1/cxx/osmpf.cc: scope_hint: In function 'std::ostream& operator<<(std::ostream&, mpf_srcptr)'
gmp-6.2.1/cxx/osmpf.cc:51:9: warning[-Wunused-but-set-variable]: variable 'ret' set but not used
# 51 | int ret;
# | ^~~
# 49| struct gmp_asprintf_t d;
# 50| char *result;
# 51|-> int ret;
# 52|
# 53| __gmp_doprnt_params_from_ios (¶m, o);
Error: CLANG_WARNING: [#def11]
gmp-6.2.1/cxx/osmpf.cc:64:3: warning[deadcode.DeadStores]: Value stored to 'ret' is never read
# 62|
# 63| GMP_ASPRINTF_T_INIT (d, &result);
# 64|-> ret = __gmp_doprnt_mpf (&__gmp_asprintf_funs_noformat, &d, ¶m, point, f);
# 65| ASSERT (ret != -1);
# 66| __gmp_asprintf_final (&d);
Error: COMPILER_WARNING (CWE-563): [#def12]
gmp-6.2.1/extract-dbl.c: scope_hint: In function '__gmp_extract_double'
gmp-6.2.1/extract-dbl.c:53:21: warning[-Wunused-variable]: unused variable 'manh'
# 53 | unsigned long int manh, manl;
# | ^~~~
# 51| #else
# 52| #define BITS_PER_PART GMP_LIMB_BITS
# 53|-> unsigned long int manh, manl;
# 54| #endif
# 55|
Error: CLANG_WARNING: [#def13]
gmp-6.2.1/gen-trialdivtab.c:165:3: warning[deadcode.DeadStores]: Value stored to 'interval_start' is never read
# 163|
# 164| mpz_set_ui (ppp, 1);
# 165|-> interval_start = start_p;
# 166| interval_end = 0;
# 167| np = 0;
Error: CLANG_WARNING: [#def14]
gmp-6.2.1/gen-trialdivtab.c:166:3: warning[deadcode.DeadStores]: Value stored to 'interval_end' is never read
# 164| mpz_set_ui (ppp, 1);
# 165| interval_start = start_p;
# 166|-> interval_end = 0;
# 167| np = 0;
# 168| start_idx = 0;
Error: CLANG_WARNING: [#def15]
gmp-6.2.1/gen-trialdivtab.c:202:4: warning[deadcode.DeadStores]: Value stored to 'interval_start' is never read
# 200| endtok = ",\n";
# 201| mpz_set_ui (ppp, t);
# 202|-> interval_start = t;
# 203| start_idx = np;
# 204| }
Error: CLANG_WARNING: [#def16]
gmp-6.2.1/gen-trialdivtab.c:209:7: warning[deadcode.DeadStores]: Value stored to 'interval_end' is never read
# 207| mpz_set (ppp, acc);
# 208| }
# 209|-> interval_end = t;
# 210| np++;
# 211| }
Error: COMPILER_WARNING (CWE-563): [#def17]
gmp-6.2.1/mpn/generic/toom_interpolate_5pts.c:38: included_from: Included from here.
gmp-6.2.1/mpn/generic/toom_interpolate_5pts.c: scope_hint: In function '__gmpn_toom_interpolate_5pts'
gmp-6.2.1/gmp-impl.h:1662:6: warning[-Wunused-value]: value computed is not used
# 1662 | (3 & mpn_bdiv_dbm1 (dst, src, size, __GMP_CAST (mp_limb_t, GMP_NUMB_MASK / 3)))
# | ^
gmp-6.2.1/gmp-impl.h:2459:33: note: in definition of macro 'ASSERT_NOCARRY'
# 2459 | #define ASSERT_NOCARRY(expr) (expr)
# | ^~~~
gmp-6.2.1/mpn/generic/toom_interpolate_5pts.c:70:19: note: in expansion of macro 'mpn_divexact_by3'
# 70 | ASSERT_NOCARRY (mpn_divexact_by3 (v2, v2, kk1)); /* v2 <- v2 / 3 */
# | ^~~~~~~~~~~~~~~~
# 1660| #undef mpn_divexact_by3
# 1661| #define mpn_divexact_by3(dst,src,size) \
# 1662|-> (3 & mpn_bdiv_dbm1 (dst, src, size, __GMP_CAST (mp_limb_t, GMP_NUMB_MASK / 3)))
# 1663| /* override mpn_divexact_by3c defined in gmp.h */
# 1664| /*
Error: COMPILER_WARNING (CWE-563): [#def18]
gmp-6.2.1/gmp-impl.h:1698:7: warning[-Wunused-value]: value computed is not used
# 1698 | (15 & 1 * mpn_bdiv_dbm1 (dst, src, size, __GMP_CAST (mp_limb_t, GMP_NUMB_MASK / 15)))
# | ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gmp-6.2.1/mpn/generic/toom_interpolate_7pts.c:212:3: note: in expansion of macro 'mpn_divexact_by15'
# 212 | mpn_divexact_by15 (w1, w1, m);
# | ^~~~~~~~~~~~~~~~~
# 1696| #if GMP_NUMB_BITS % 4 == 0
# 1697| #define mpn_divexact_by15(dst,src,size) \
# 1698|-> (15 & 1 * mpn_bdiv_dbm1 (dst, src, size, __GMP_CAST (mp_limb_t, GMP_NUMB_MASK / 15)))
# 1699| #endif
# 1700|
Error: CLANG_WARNING: [#def19]
gmp-6.2.1/mpn/fib_table.c:4: included_from: Included from here.
gmp-6.2.1/gmp-impl.h:4187:10: warning[deadcode.DeadStores]: Although the value stored to 'bits' is used in the enclosing expression, the value is never actually read from 'bits'
# 4185| here, but at least on x86, that's no real saving.
# 4186| */
# 4187|-> return bits = jacobi_table[(bits << 3) + (denominator << 2) + q];
# 4188| }
# 4189|
Error: GCC_ANALYZER_WARNING (CWE-457): [#def20]
gmp-6.2.1/longlong.h:1062:3: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'rh'
gmp-6.2.1/mpn/generic/mod_1_3.c:146:3: note: in expansion of macro 'umul_ppmm'
gmp-6.2.1/mpn/generic/mod_1_3.c:146:3: note: in expansion of macro 'umul_ppmm'
gmp-6.2.1/mpn/generic/mod_1_3.c:146:3: note: in expansion of macro 'umul_ppmm'
# 1060| #else
# 1061| #define umul_ppmm(w1, w0, u, v) \
# 1062|-> __asm__ ("mulq\t%3" \
# 1063| : "=a" (w0), "=d" (w1) \
# 1064| : "%0" ((UDItype)(u)), "rm" ((UDItype)(v)))
Error: GCC_ANALYZER_WARNING (CWE-457): [#def21]
gmp-6.2.1/mpn/generic/mod_1_3.c:41: included_from: Included from here.
gmp-6.2.1/mpn/generic/mod_1_3.c: scope_hint: In function '__gmpn_mod_1s_3p'
gmp-6.2.1/longlong.h:1062:3: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'rl'
gmp-6.2.1/mpn/generic/mod_1_3.c:139:7: note: in expansion of macro 'umul_ppmm'
gmp-6.2.1/longlong.h:1064:30: note: in definition of macro 'umul_ppmm'
gmp-6.2.1/mpn/generic/mod_1_3.c:139:7: note: in expansion of macro 'umul_ppmm'
# 1060| #else
# 1061| #define umul_ppmm(w1, w0, u, v) \
# 1062|-> __asm__ ("mulq\t%3" \
# 1063| : "=a" (w0), "=d" (w1) \
# 1064| : "%0" ((UDItype)(u)), "rm" ((UDItype)(v)))
Error: COMPILER_WARNING (CWE-457): [#def22]
gmp-6.2.1/mpn/generic/mod_1_3.c:41: included_from: Included from here.
gmp-6.2.1/mpn/generic/mod_1_3.c: scope_hint: In function '__gmpn_mod_1s_3p'
gmp-6.2.1/longlong.h:1062:3: warning[-Wmaybe-uninitialized]: 'rh' may be used uninitialized
# 1062 | __asm__ ("mulq\t%3" \
# | ^~~~~~~
gmp-6.2.1/mpn/generic/mod_1_3.c:89:13: note: 'rh' was declared here
# 89 | mp_limb_t rh, rl, bi, ph, pl, ch, cl, r;
# | ^~
# 1060| #else
# 1061| #define umul_ppmm(w1, w0, u, v) \
# 1062|-> __asm__ ("mulq\t%3" \
# 1063| : "=a" (w0), "=d" (w1) \
# 1064| : "%0" ((UDItype)(u)), "rm" ((UDItype)(v)))
Error: COMPILER_WARNING (CWE-457): [#def23]
gmp-6.2.1/longlong.h:1062:3: warning[-Wmaybe-uninitialized]: 'rl' may be used uninitialized
# 1062 | __asm__ ("mulq\t%3" \
# | ^~~~~~~
gmp-6.2.1/mpn/generic/mod_1_3.c:89:17: note: 'rl' was declared here
# 89 | mp_limb_t rh, rl, bi, ph, pl, ch, cl, r;
# | ^~
# 1060| #else
# 1061| #define umul_ppmm(w1, w0, u, v) \
# 1062|-> __asm__ ("mulq\t%3" \
# 1063| : "=a" (w0), "=d" (w1) \
# 1064| : "%0" ((UDItype)(u)), "rm" ((UDItype)(v)))
Error: CPPCHECK_WARNING (CWE-758): [#def24]
gmp-6.2.1/mini-gmp/mini-gmp.c:1492: error[shiftTooManyBits]: Shifting 64-bit value by 64 bits is undefined behaviour
# 1490| {
# 1491| int LOCAL_GMP_LIMB_BITS = GMP_LIMB_BITS;
# 1492|-> while (x >>= LOCAL_GMP_LIMB_BITS)
# 1493| {
# 1494| ++ r->_mp_size;
Error: CPPCHECK_WARNING (CWE-758): [#def25]
gmp-6.2.1/mini-gmp/mini-gmp.c:1591: error[shiftTooManyBits]: Shifting 64-bit value by 64 bits is undefined behaviour
# 1589| n = GMP_MIN (n, 1 + (mp_size_t) (GMP_ULONG_BITS - 1) / GMP_LIMB_BITS);
# 1590| while (--n >= 0)
# 1591|-> r = (r << LOCAL_GMP_LIMB_BITS) + u->_mp_d[n];
# 1592| return r;
# 1593| }
Error: CLANG_WARNING: [#def26]
gmp-6.2.1/gen-psqr.c:34: included_from: Included from here.
gmp-6.2.1/bootstrap.c:33: included_from: Included from here.
gmp-6.2.1/mini-gmp/mini-gmp.c:3639:6: warning[core.uninitialized.Assign]: Assigned value is garbage or undefined
# 3637| int bit;
# 3638|
# 3639|-> ds = d->_mp_size;
# 3640| dn = GMP_ABS (ds);
# 3641| limb_index = bit_index / GMP_LIMB_BITS;
Error: CLANG_WARNING: [#def27]
gmp-6.2.1/mpf/cmp_z.c:40:14: warning[deadcode.DeadStores]: Although the value stored to 'size' is used in the enclosing expression, the value is never actually read from 'size'
# 38|
# 39| SIZ (vf) = size = SIZ (v);
# 40|-> EXP (vf) = size = ABS (size);
# 41| /* PREC (vf) = size; */
# 42| PTR (vf) = PTR (v);
Error: COMPILER_WARNING: [#def28]
gmp-6.2.1/mpf/reldiff.c:39:20: warning[-Warray-parameter=]: argument 1 of type '__mpf_struct[1]' with mismatched bound
# 39 | mpf_reldiff (mpf_t rdiff, mpf_srcptr x, mpf_srcptr y)
# | ~~~~~~^~~~~
gmp-6.2.1/gmp-impl.h:145: included_from: Included from here.
gmp-6.2.1/mpf/reldiff.c:31: included_from: Included from here.
gmp-6.2.1/gmp.h:1396:34: note: previously declared as 'mpf_ptr' {aka '__mpf_struct *'}
# 1396 | __GMP_DECLSPEC void mpf_reldiff (mpf_ptr, mpf_srcptr, mpf_srcptr);
# | ^~~~~~~
# 37|
# 38| void
# 39|-> mpf_reldiff (mpf_t rdiff, mpf_srcptr x, mpf_srcptr y)
# 40| {
# 41| if (UNLIKELY (SIZ(x) == 0))
Error: COMPILER_WARNING: [#def29]
gmp-6.2.1/mpf/set_q.c:54:18: warning[-Warray-parameter=]: argument 1 of type '__mpf_struct[1]' with mismatched bound
# 54 | mpf_set_q (mpf_t r, mpq_srcptr q)
# | ~~~~~~^
gmp-6.2.1/gmp-impl.h:145: included_from: Included from here.
gmp-6.2.1/mpf/set_q.c:31: included_from: Included from here.
gmp-6.2.1/gmp.h:1414:32: note: previously declared as 'mpf_ptr' {aka '__mpf_struct *'}
# 1414 | __GMP_DECLSPEC void mpf_set_q (mpf_ptr, mpq_srcptr);
# | ^~~~~~~
# 52|
# 53| void
# 54|-> mpf_set_q (mpf_t r, mpq_srcptr q)
# 55| {
# 56| mp_srcptr np, dp;
Error: CLANG_WARNING: [#def30]
gmp-6.2.1/mpf/set_str.c:249:7: warning[deadcode.DeadStores]: Value stored to 'c' is never read
# 247| }
# 248| }
# 249|-> c = (unsigned char) *++str;
# 250| }
# 251|
Error: CLANG_WARNING: [#def31]
gmp-6.2.1/mpf/sqrt.c:100:7: warning[deadcode.DeadStores]: Value stored to 'usize' is never read
# 98| {
# 99| up += usize - tsize;
# 100|-> usize = tsize;
# 101| MPN_COPY (tp, up, tsize);
# 102| }
Error: CLANG_WARNING: [#def32]
gmp-6.2.1/mpn/generic/compute_powtab.c:114:46: warning[core.BitwiseShift]: Left shift by '18446744073709551615' overflows the capacity of 'size_t'
# 112| else
# 113| {
# 114|-> if (((digits_in_base + chars_per_limb) << (n_pows-2)) <= exptab[0])
# 115| {
# 116| /* 3, sometimes adjusted to 4. */
Error: CLANG_WARNING: [#def33]
gmp-6.2.1/mpn/generic/dcpi1_div_qr.c:146:8: warning[deadcode.DeadStores]: Value stored to 'cy' is never read
# 144| {
# 145| q = GMP_NUMB_MASK;
# 146|-> cy = mpn_submul_1 (np - dn, dp - dn, dn, q);
# 147| ASSERT (cy == n2);
# 148| }
Error: CLANG_WARNING: [#def34]
gmp-6.2.1/mpn/generic/dcpi1_divappr_q.c:140:8: warning[deadcode.DeadStores]: Value stored to 'cy' is never read
# 138| {
# 139| q = GMP_NUMB_MASK;
# 140|-> cy = mpn_submul_1 (np - dn, dp - dn, dn, q);
# 141| ASSERT (cy == n2);
# 142| }
Error: CLANG_WARNING: [#def35]
gmp-6.2.1/mpn/generic/div_q.c:265:8: warning[deadcode.DeadStores]: Value stored to 'qh' is never read
# 263| for (i = 0; i < n; i++)
# 264| tp[i] = GMP_NUMB_MAX;
# 265|-> qh = 0; /* currently ignored */
# 266| }
# 267| }
Error: COMPILER_WARNING (CWE-457): [#def36]
gmp-6.2.1/mpn/generic/gcdext.c: scope_hint: In function '__gmpn_gcdext'
gmp-6.2.1/mpn/generic/gcdext.c:303:50: warning[-Wmaybe-uninitialized]: 'matrix_scratch' may be used uninitialized
# 303 | nn = mpn_hgcd (ap + p, bp + p, n - p, &M, tp + matrix_scratch);
# | ^
gmp-6.2.1/mpn/generic/gcdext.c:203:13: note: 'matrix_scratch' was declared here
# 203 | mp_size_t matrix_scratch;
# | ^~~~~~~~~~~~~~
# 301|
# 302| mpn_hgcd_matrix_init (&M, n - p, tp);
# 303|-> nn = mpn_hgcd (ap + p, bp + p, n - p, &M, tp + matrix_scratch);
# 304| if (nn > 0)
# 305| {
Error: CLANG_WARNING: [#def37]
gmp-6.2.1/mpn/generic/get_d.c:190:4: warning[deadcode.DeadStores]: Value stored to 'nbits' is never read
# 188| x >>= nbits;
# 189| mlo |= x;
# 190|-> nbits += GMP_NUMB_BITS;
# 191|
# 192| if (LIMBS_PER_DOUBLE >= 3 && nbits < 53 && size > 2)
Error: COMPILER_WARNING (CWE-563): [#def38]
gmp-6.2.1/mpn/generic/invertappr.c: scope_hint: In function '__gmpn_ni_invertappr'
gmp-6.2.1/mpn/generic/invertappr.c:230:21: warning[-Wunused-but-set-variable]: variable 'chk' set but not used
# 230 | mp_limb_t chk;
# | ^~~
# 228| if (cy++) {
# 229| if (mpn_cmp (xp, dp - n, n) > 0) {
# 230|-> mp_limb_t chk;
# 231| chk = mpn_sublsh1_n (xp, xp, dp - n, n);
# 232| ASSERT (chk == xp[n]);
Error: CLANG_WARNING: [#def39]
gmp-6.2.1/mpn/generic/invertappr.c:231:4: warning[deadcode.DeadStores]: Value stored to 'chk' is never read
# 229| if (mpn_cmp (xp, dp - n, n) > 0) {
# 230| mp_limb_t chk;
# 231|-> chk = mpn_sublsh1_n (xp, xp, dp - n, n);
# 232| ASSERT (chk == xp[n]);
# 233| ++ cy;
Error: COMPILER_WARNING (CWE-563): [#def40]
gmp-6.2.1/mpn/generic/matrix22_mul1_inverse_vector.c:44:13: warning[-Wunused-but-set-variable]: variable 'h0' set but not used
# 44 | mp_limb_t h0, h1;
# | ^~
# 42| mp_ptr rp, mp_srcptr ap, mp_ptr bp, mp_size_t n)
# 43| {
# 44|-> mp_limb_t h0, h1;
# 45|
# 46| /* Compute (r;b) <-- (u11 a - u01 b; -u10 a + u00 b) as
Error: COMPILER_WARNING (CWE-563): [#def41]
gmp-6.2.1/mpn/generic/matrix22_mul1_inverse_vector.c: scope_hint: In function '__gmpn_matrix22_mul1_inverse_vector'
gmp-6.2.1/mpn/generic/matrix22_mul1_inverse_vector.c:44:17: warning[-Wunused-but-set-variable]: variable 'h1' set but not used
# 44 | mp_limb_t h0, h1;
# | ^~
# 42| mp_ptr rp, mp_srcptr ap, mp_ptr bp, mp_size_t n)
# 43| {
# 44|-> mp_limb_t h0, h1;
# 45|
# 46| /* Compute (r;b) <-- (u11 a - u01 b; -u10 a + u00 b) as
Error: CLANG_WARNING: [#def42]
gmp-6.2.1/mpn/generic/matrix22_mul1_inverse_vector.c:54:3: warning[deadcode.DeadStores]: Value stored to 'h0' is never read
# 52| */
# 53|
# 54|-> h0 = mpn_mul_1 (rp, ap, n, M->u[1][1]);
# 55| h1 = mpn_submul_1 (rp, bp, n, M->u[0][1]);
# 56| ASSERT (h0 == h1);
Error: CLANG_WARNING: [#def43]
gmp-6.2.1/mpn/generic/matrix22_mul1_inverse_vector.c:55:3: warning[deadcode.DeadStores]: Value stored to 'h1' is never read
# 53|
# 54| h0 = mpn_mul_1 (rp, ap, n, M->u[1][1]);
# 55|-> h1 = mpn_submul_1 (rp, bp, n, M->u[0][1]);
# 56| ASSERT (h0 == h1);
# 57|
Error: CLANG_WARNING: [#def44]
gmp-6.2.1/mpn/generic/matrix22_mul1_inverse_vector.c:58:3: warning[deadcode.DeadStores]: Value stored to 'h0' is never read
# 56| ASSERT (h0 == h1);
# 57|
# 58|-> h0 = mpn_mul_1 (bp, bp, n, M->u[0][0]);
# 59| h1 = mpn_submul_1 (bp, ap, n, M->u[1][0]);
# 60| ASSERT (h0 == h1);
Error: CLANG_WARNING: [#def45]
gmp-6.2.1/mpn/generic/matrix22_mul1_inverse_vector.c:59:3: warning[deadcode.DeadStores]: Value stored to 'h1' is never read
# 57|
# 58| h0 = mpn_mul_1 (bp, bp, n, M->u[0][0]);
# 59|-> h1 = mpn_submul_1 (bp, ap, n, M->u[1][0]);
# 60| ASSERT (h0 == h1);
# 61|
Error: CLANG_WARNING: [#def46]
gmp-6.2.1/mpn/generic/mu_div_qr.c:339:4: warning[deadcode.DeadStores]: Value stored to 'cy' is never read
# 337| /* This is executed with about 76% probability. */
# 338| mpn_incr_u (qp, 1);
# 339|-> cy = mpn_sub_n (rp, rp, dp, dn);
# 340| STAT (err++);
# 341| }
Error: GCC_ANALYZER_WARNING (CWE-457): [#def47]
gmp-6.2.1/mpn/generic/mu_divappr_q.c: scope_hint: In function 'mpn_preinv_mu_divappr_q'
gmp-6.2.1/mpn/generic/mu_divappr_q.c:291:6: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'cy'
gmp-6.2.1/gmp-impl.h:145: included_from: Included from here.
gmp-6.2.1/mpn/generic/mu_divappr_q.c:71: included_from: Included from here.
gmp-6.2.1/gmp.h:1468:19: note: in expansion of macro '__MPN'
gmp-6.2.1/mpn/generic/mu_divappr_q.c:291:9: note: in expansion of macro 'mpn_add_1'
gmp-6.2.1/gmp.h:2068:3: note: in expansion of macro '__GMPN_AORS_1'
gmp-6.2.1/gmp.h:2155:3: note: in expansion of macro '__GMPN_ADD_1'
gmp-6.2.1/mpn/generic/mu_divappr_q.c: scope_hint: In function 'mpn_preinv_mu_divappr_q'
# 289| quotient; add 3 with saturating arithmetic. */
# 290| qn = nn - dn;
# 291|-> cy += mpn_add_1 (qp, qp, qn, 3);
# 292| if (cy != 0)
# 293| {
Error: CLANG_WARNING: [#def48]
gmp-6.2.1/mpn/generic/mu_divappr_q.c:291:6: warning[core.uninitialized.Assign]: The left expression of the compound assignment is an uninitialized value. The computed value will also be garbage
# 289| quotient; add 3 with saturating arithmetic. */
# 290| qn = nn - dn;
# 291|-> cy += mpn_add_1 (qp, qp, qn, 3);
# 292| if (cy != 0)
# 293| {
Error: COMPILER_WARNING (CWE-457): [#def49]
gmp-6.2.1/mpn/generic/mu_divappr_q.c:292:6: warning[-Wmaybe-uninitialized]: 'cy' may be used uninitialized
# 292 | if (cy != 0)
# | ^
gmp-6.2.1/mpn/generic/mu_divappr_q.c: scope_hint: In function '__gmpn_mu_divappr_q'
gmp-6.2.1/mpn/generic/mu_divappr_q.c:172:13: note: 'cy' was declared here
# 172 | mp_limb_t cy, cx, qh;
# | ^~
# 290| qn = nn - dn;
# 291| cy += mpn_add_1 (qp, qp, qn, 3);
# 292|-> if (cy != 0)
# 293| {
# 294| if (qh != 0)
Error: CLANG_WARNING: [#def50]
gmp-6.2.1/mpn/generic/mul_fft.c:812:12: warning[deadcode.DeadStores]: Although the value stored to 'cc' is used in the enclosing expression, the value is never actually read from 'cc'
# 810| if (cc == -CNST_LIMB(1))
# 811| {
# 812|-> if ((cc = mpn_add_1 (p + pla - pl, p + pla - pl, pl, CNST_LIMB(1))))
# 813| {
# 814| /* p[pla-pl]...p[pla-1] are all zero */
Error: CLANG_WARNING: [#def51]
gmp-6.2.1/mpn/generic/mul_fft.c:828:4: warning[deadcode.DeadStores]: Value stored to 'cc' is never read
# 826| else
# 827| {
# 828|-> cc = mpn_sub_1 (p + pla - pl, p + pla - pl, pl, cc);
# 829| ASSERT (cc == 0);
# 830| }
Error: CLANG_WARNING: [#def52]
gmp-6.2.1/mpn/generic/mulmod_bnm1.c:317:4: warning[deadcode.DeadStores]: Value stored to 'cy' is never read
# 315| ASSERT (an + bn == rn - 1 ||
# 316| mpn_zero_p (xp + an + bn - n + 1, rn - 1 - (an + bn)));
# 317|-> cy = mpn_sub_1 (rp, rp, an + bn, cy);
# 318| ASSERT (cy == (xp + an + bn - n)[0]);
# 319| }
Error: COMPILER_WARNING (CWE-457): [#def53]
gmp-6.2.1/mpn/generic/remove.c: scope_hint: In function '__gmpn_remove'
gmp-6.2.1/mpn/generic/remove.c:141:12: warning[-Wmaybe-uninitialized]: 'np' may be used uninitialized
# 141 | np += pn;
# | ~~~^~~~~
gmp-6.2.1/mpn/generic/remove.c:88:18: note: 'np' was declared here
# 88 | mp_ptr tp, qp, np, qp2;
# | ^~
# 139| np = TMP_ALLOC_LIMBS (qn + LOG); /* powers of V */
# 140| else
# 141|-> np += pn;
# 142|
# 143| mpn_sqr (np, pp, pn);
Error: GCC_ANALYZER_WARNING: [#def54]
gmp-6.2.1/mpn/generic/rootrem.c:300:3: warning[-Wanalyzer-imprecise-fp-arithmetic]: use of floating-point arithmetic here might yield unexpected results
gmp-6.2.1/mpn/generic/rootrem.c:300:3: note: in expansion of macro 'TMP_ALLOC_LIMBS_3'
gmp-6.2.1/mpn/generic/rootrem.c:300:3: note: only use operands of an integer type inside the size argument
# 298| 258/256 instead of 3/2 ? log2(258/256) < 1/89 < 1/64 */
# 299| #define EXTRA 2 + (mp_size_t) (0.585 * (double) k / (double) GMP_NUMB_BITS)
# 300|-> TMP_ALLOC_LIMBS_3 (scratch, un + 1, /* used by mpn_div_q */
# 301| qp, un + EXTRA, /* will contain quotient and remainder
# 302| of R/(k*S^(k-1)), and S^k */
Error: CLANG_WARNING: [#def55]
gmp-6.2.1/mpn/generic/rootrem.c:514:3: warning[core.uninitialized.UndefReturn]: Undefined or garbage value returned to caller
# 512|
# 513| TMP_FREE;
# 514|-> return rn;
# 515| }
Error: COMPILER_WARNING (CWE-457): [#def56]
gmp-6.2.1/mpn/generic/rootrem.c: scope_hint: In function 'mpn_rootrem_internal'
gmp-6.2.1/mpn/generic/rootrem.c:514:10: warning[-Wmaybe-uninitialized]: 'rn' may be used uninitialized
# 514 | return rn;
# | ^~
gmp-6.2.1/mpn/generic/rootrem.c:211:17: note: 'rn' was declared here
# 211 | mp_size_t qn, rn, sn, wn, nl, bn;
# | ^~
# 512|
# 513| TMP_FREE;
# 514|-> return rn;
# 515| }
Error: CLANG_WARNING: [#def57]
gmp-6.2.1/mpn/generic/sbpi1_div_q.c:292:9: warning[deadcode.DeadStores]: Value stored to 'cy' is never read
# 290| if (x == 0)
# 291| {
# 292|-> cy = mpn_sub_1 (qp, qp, qn, 1);
# 293| return qh;
# 294| }
Error: CLANG_WARNING: [#def58]
gmp-6.2.1/mpn/generic/sbpi1_divappr_q.c:180:3: warning[deadcode.DeadStores]: Value stored to 'flag' is never read
# 178| }
# 179| else
# 180|-> flag = 0;
# 181| }
# 182| n1 = np[1];
Error: COMPILER_WARNING (CWE-563): [#def59]
gmp-6.2.1/mpn/generic/sec_div.c: scope_hint: In function '__gmpn_sec_div_r'
gmp-6.2.1/mpn/generic/sec_div.c:86:17: warning[-Wunused-variable]: unused variable 'qh'
# 86 | mp_limb_t qh, cy;
# | ^~
# 84| if (cnt != 0)
# 85| {
# 86|-> mp_limb_t qh, cy;
# 87| mp_ptr np2, dp2;
# 88| dp2 = tp; /* dn limbs */
Error: CLANG_WARNING: [#def60]
gmp-6.2.1/mpn/generic/sec_div.c:102:7: warning[deadcode.DeadStores]: Value stored to 'qh' is never read
# 100| since nn here will have been incremented. */
# 101| #if OPERATION_sec_div_qr
# 102|-> qh = mpn_sec_pi1_div_qr (np2 + dn, np2, nn, dp2, dn, inv32, tp + nn + dn);
# 103| ASSERT (qh == 0); /* FIXME: this indicates inefficiency! */
# 104| MPN_COPY (qp, np2 + dn, nn - dn - 1);
Error: CLANG_WARNING: [#def61]
gmp-6.2.1/mpn/generic/sec_invert.c:161:7: warning[deadcode.DeadStores]: Value stored to 'cy' is never read
# 159| mpn_cnd_swap (swap, up, vp, n);
# 160| cy = mpn_cnd_sub_n (odd, up, up, vp, n);
# 161|-> cy -= mpn_cnd_add_n (cy, up, up, mp, n);
# 162| ASSERT (cy == 0);
# 163|
Error: CLANG_WARNING: [#def62]
gmp-6.2.1/mpn/generic/sec_invert.c:164:7: warning[deadcode.DeadStores]: Value stored to 'cy' is never read
# 162| ASSERT (cy == 0);
# 163|
# 164|-> cy = mpn_rshift (ap, ap, n, 1);
# 165| ASSERT (cy == 0);
# 166| cy = mpn_rshift (up, up, n, 1);
Error: CLANG_WARNING: [#def63]
gmp-6.2.1/mpn/generic/sec_invert.c:167:7: warning[deadcode.DeadStores]: Value stored to 'cy' is never read
# 165| ASSERT (cy == 0);
# 166| cy = mpn_rshift (up, up, n, 1);
# 167|-> cy = mpn_cnd_add_n (cy, up, up, m1hp, n);
# 168| ASSERT (cy == 0);
# 169| }
Error: CLANG_WARNING: [#def64]
gmp-6.2.1/mpn/generic/sqrmod_bnm1.c:277:4: warning[deadcode.DeadStores]: Value stored to 'cy' is never read
# 275| xp + 2*an - n, rn - 2*an, cy);
# 276| ASSERT (mpn_zero_p (xp + 2*an - n+1, rn - 1 - 2*an));
# 277|-> cy = mpn_sub_1 (rp, rp, 2*an, cy);
# 278| ASSERT (cy == (xp + 2*an - n)[0]);
# 279| }
Error: CLANG_WARNING: [#def65]
gmp-6.2.1/mpn/generic/sqrtrem.c:273:7: warning[deadcode.DeadStores]: Value stored to 'q' is never read
# 271| #endif
# 272| c -= mpn_sub_1 (np, np, n, CNST_LIMB(1));
# 273|-> q -= mpn_sub_1 (sp, sp, n, CNST_LIMB(1));
# 274| }
# 275|
Error: CLANG_WARNING: [#def66]
gmp-6.2.1/mpn/generic/toom42_mul.c:103:15: warning[deadcode.DeadStores]: Value stored to 'tmp' is never read
# 101| bs1 = tmp; tmp += n + 1;
# 102| bsm1 = tmp; tmp += n;
# 103|-> bs2 = tmp; tmp += n + 1;
# 104|
# 105| a0_a2 = pp;
Error: CLANG_WARNING: [#def67]
gmp-6.2.1/mpn/generic/toom53_mul.c:105:15: warning[deadcode.DeadStores]: Value stored to 'tmp' is never read
# 103| bs2 = tmp; tmp += n + 1;
# 104| bsm2 = tmp; tmp += n + 1;
# 105|-> bsh = tmp; tmp += n + 1;
# 106|
# 107| gp = pp;
Error: COMPILER_WARNING (CWE-563): [#def68]
gmp-6.2.1/mpn/generic/toom_interpolate_12pts.c: scope_hint: In function '__gmpn_toom_interpolate_12pts'
gmp-6.2.1/mpn/generic/toom_interpolate_12pts.c:137:8: warning[-Wunused-value]: value computed is not used
# 137 | (255 & 1 * mpn_bdiv_dbm1 (dst, src, size, __GMP_CAST (mp_limb_t, GMP_NUMB_MASK / 255)))
# | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gmp-6.2.1/mpn/generic/toom_interpolate_12pts.c:268:3: note: in expansion of macro 'mpn_divexact_by255'
# 268 | mpn_divexact_by255(r5, r5, n3p1);
# | ^~~~~~~~~~~~~~~~~~
# 135| #if GMP_NUMB_BITS % 8 == 0
# 136| #define mpn_divexact_by255(dst,src,size) \
# 137|-> (255 & 1 * mpn_bdiv_dbm1 (dst, src, size, __GMP_CAST (mp_limb_t, GMP_NUMB_MASK / 255)))
# 138| #else
# 139| #if HAVE_NATIVE_mpn_pi1_bdiv_q_1
Error: COMPILER_WARNING: [#def69]
gmp-6.2.1/mpn/fat_addmul_2.c:10: included_from: Included from here.
gmp-6.2.1/mpn/x86_64/fat/addmul_2.c:34:69: warning[-Warray-parameter=]: argument 4 of type 'const mp_limb_t[2]' {aka 'const long unsigned int[2]'} with mismatched bound
# 34 | mpn_addmul_2 (mp_ptr rp, mp_srcptr up, mp_size_t n, const mp_limb_t vp[2])
# | ~~~~~~~~~~~~~~~~^~~~~
gmp-6.2.1/mpn/x86_64/fat/addmul_2.c:31: included_from: Included from here.
gmp-6.2.1/gmp-impl.h:75:64: note: previously declared as 'mp_srcptr' {aka 'const long unsigned int *'}
# 75 | __GMP_DECLSPEC mp_limb_t name (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr)
# | ^~~~~~~~~
gmp-6.2.1/fat.h:420:1: note: in expansion of macro 'DECL_addmul_2'
# 420 | DECL_addmul_2 (__gmpn_addmul_2_fat);
# | ^~~~~~~~~~~~~
# 32|
# 33| mp_limb_t
# 34|-> mpn_addmul_2 (mp_ptr rp, mp_srcptr up, mp_size_t n, const mp_limb_t vp[2])
# 35| {
# 36| rp[n] = mpn_addmul_1 (rp, up, n, vp[0]);
Error: COMPILER_WARNING: [#def70]
gmp-6.2.1/mpq/canonicalize.c:35:25: warning[-Warray-parameter=]: argument 1 of type '__mpq_struct[1]' with mismatched bound
# 35 | mpq_canonicalize (mpq_t op)
# | ~~~~~~^~
gmp-6.2.1/gmp-impl.h:145: included_from: Included from here.
gmp-6.2.1/mpq/canonicalize.c:32: included_from: Included from here.
gmp-6.2.1/gmp.h:1144:39: note: previously declared as 'mpq_ptr' {aka '__mpq_struct *'}
# 1144 | __GMP_DECLSPEC void mpq_canonicalize (mpq_ptr);
# | ^~~~~~~
# 33|
# 34| void
# 35|-> mpq_canonicalize (mpq_t op)
# 36| {
# 37| mpz_t gcd;
Error: COMPILER_WARNING: [#def71]
gmp-6.2.1/mpq/clear.c:35:18: warning[-Warray-parameter=]: argument 1 of type '__mpq_struct[1]' with mismatched bound
# 35 | mpq_clear (mpq_t x)
# | ~~~~~~^
gmp-6.2.1/gmp-impl.h:145: included_from: Included from here.
gmp-6.2.1/mpq/clear.c:32: included_from: Included from here.
gmp-6.2.1/gmp.h:1147:32: note: previously declared as 'mpq_ptr' {aka '__mpq_struct *'}
# 1147 | __GMP_DECLSPEC void mpq_clear (mpq_ptr);
# | ^~~~~~~
# 33|
# 34| void
# 35|-> mpq_clear (mpq_t x)
# 36| {
# 37| if (ALLOC (NUM(x)))
Error: COMPILER_WARNING: [#def72]
gmp-6.2.1/mpq/init.c:35:17: warning[-Warray-parameter=]: argument 1 of type '__mpq_struct[1]' with mismatched bound
# 35 | mpq_init (mpq_t x)
# | ~~~~~~^
gmp-6.2.1/gmp-impl.h:145: included_from: Included from here.
gmp-6.2.1/mpq/init.c:32: included_from: Included from here.
gmp-6.2.1/gmp.h:1186:31: note: previously declared as 'mpq_ptr' {aka '__mpq_struct *'}
# 1186 | __GMP_DECLSPEC void mpq_init (mpq_ptr);
# | ^~~~~~~
# 33|
# 34| void
# 35|-> mpq_init (mpq_t x)
# 36| {
# 37| static const mp_limb_t dummy_limb=0xc1a0;
Error: COMPILER_WARNING: [#def73]
gmp-6.2.1/mpq/set_si.c:35:19: warning[-Warray-parameter=]: argument 1 of type '__mpq_struct[1]' with mismatched bound
# 35 | mpq_set_si (mpq_t dest, signed long int num, unsigned long int den)
# | ~~~~~~^~~~
gmp-6.2.1/gmp-impl.h:145: included_from: Included from here.
gmp-6.2.1/mpq/set_si.c:32: included_from: Included from here.
gmp-6.2.1/gmp.h:1231:33: note: previously declared as 'mpq_ptr' {aka '__mpq_struct *'}
# 1231 | __GMP_DECLSPEC void mpq_set_si (mpq_ptr, signed long int, unsigned long int);
# | ^~~~~~~
# 33|
# 34| void
# 35|-> mpq_set_si (mpq_t dest, signed long int num, unsigned long int den)
# 36| {
# 37| if (GMP_NUMB_BITS < BITS_PER_ULONG)
Error: COMPILER_WARNING: [#def74]
gmp-6.2.1/mpq/set_ui.c:35:19: warning[-Warray-parameter=]: argument 1 of type '__mpq_struct[1]' with mismatched bound
# 35 | mpq_set_ui (mpq_t dest, unsigned long int num, unsigned long int den)
# | ~~~~~~^~~~
gmp-6.2.1/gmp-impl.h:145: included_from: Included from here.
gmp-6.2.1/mpq/set_ui.c:32: included_from: Included from here.
gmp-6.2.1/gmp.h:1237:33: note: previously declared as 'mpq_ptr' {aka '__mpq_struct *'}
# 1237 | __GMP_DECLSPEC void mpq_set_ui (mpq_ptr, unsigned long int, unsigned long int);
# | ^~~~~~~
# 33|
# 34| void
# 35|-> mpq_set_ui (mpq_t dest, unsigned long int num, unsigned long int den)
# 36| {
# 37| if (GMP_NUMB_BITS < BITS_PER_ULONG)
Error: CLANG_WARNING: [#def75]
gmp-6.2.1/mpz/aorsmul.c:138:4: warning[deadcode.DeadStores]: Value stored to 'wsize' is never read
# 136| tsize = wsize;
# 137|
# 138|-> wsize = usize;
# 139| wsize_signed = -wsize_signed;
# 140| }
Error: CLANG_WARNING: [#def76]
gmp-6.2.1/mpz/bin_uiui.c:270:10: warning[core.CallAndMessage]: Called function pointer is an uninitialized pointer value
# 268| {
# 269| nmaxnow = MIN (nmax, numfac);
# 270|-> iii = mulfunc[nmaxnow - 1] (i);
# 271| i += nmaxnow; /* number of factors used */
# 272| count_trailing_zeros (cnt, iii); /* count low zeros */
Error: CLANG_WARNING: [#def77]
gmp-6.2.1/mpz/nextprime.c:124:7: warning[deadcode.DeadStores]: Value stored to 'difference' is never read
# 122| }
# 123| mpz_add_ui (p, p, difference);
# 124|-> difference = 0;
# 125| }
# 126| done:
Error: CPPCHECK_WARNING (CWE-457): [#def78]
gmp-6.2.1/mpz/pprime_p.c:73: warning[uninitvar]: Uninitialized variable: n->_mp_size
# 71|
# 72| /* If n is now even, it is not a prime. */
# 73|-> if (mpz_even_p (n))
# 74| return 0;
# 75|
Error: CLANG_WARNING: [#def79]
gmp-6.2.1/primesieve.c:269:25: warning[core.UndefinedBinaryOperatorResult]: The right operand of '<<' is a garbage value
# 267| if (n_to_bit (SEED_LIMIT + 1) < GMP_LIMB_BITS)
# 268| i = 0;
# 269|-> mask = CNST_LIMB(1) << i;
# 270| index = 0;
# 271| do {
Error: CPPCHECK_WARNING (CWE-664): [#def80]
gmp-6.2.1/printf/doprnt.c:175: error[va_list_usedBeforeStarted]: va_list 'ap' used before va_start() was called.
# 173| very small part of the total work, and we may as well keep applications
# 174| out of trouble. */
# 175|-> va_copy (ap, orig_ap);
# 176|
# 177| /* The format string is chopped up into pieces to be passed to
Error: CPPCHECK_WARNING (CWE-664): [#def81]
gmp-6.2.1/printf/doprnt.c:195: error[va_list_usedBeforeStarted]: va_list 'ap' used before va_start() was called.
# 193| the next output will begin, when that's done */
# 194| last_fmt = fmt;
# 195|-> va_copy (last_ap, ap);
# 196|
# 197| for (;;)
Error: CPPCHECK_WARNING (CWE-664): [#def82]
gmp-6.2.1/printf/doprnt.c:195: error[va_list_usedBeforeStarted]: va_list 'last_ap' used before va_start() was called.
# 193| the next output will begin, when that's done */
# 194| last_fmt = fmt;
# 195|-> va_copy (last_ap, ap);
# 196|
# 197| for (;;)
Error: GCC_ANALYZER_WARNING (CWE-404): [#def83]
gmp-6.2.1/printf/doprnt.c: scope_hint: In function '__gmp_doprnt'
gmp-6.2.1/printf/doprnt.c:207:7: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
# 205| /* this_fmt and this_ap are the current '%' sequence being considered */
# 206| this_fmt = fmt;
# 207|-> va_copy (this_ap, ap);
# 208| fmt++; /* skip the '%' */
# 209|
Error: GCC_ANALYZER_WARNING (CWE-404): [#def84]
gmp-6.2.1/printf/doprnt.c:344:17: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
gmp-6.2.1/printf/doprnt.c:321:15: note: in expansion of macro 'FLUSH'
gmp-6.2.1/gmp-impl.h:145: included_from: Included from here.
gmp-6.2.1/printf/doprnt.c:66: included_from: Included from here.
gmp-6.2.1/printf/doprnt.c:322:25: note: in expansion of macro 'mpq_get_str'
gmp-6.2.1/printf/doprnt.c:343:17: note: in expansion of macro 'DOPRNT_ACCUMULATE'
gmp-6.2.1/printf/doprnt.c:343:17: note: in expansion of macro 'DOPRNT_ACCUMULATE'
# 342| __GMP_FREE_FUNC_TYPE (gmp_str, strlen(gmp_str)+1, char);
# 343| DOPRNT_ACCUMULATE (ret);
# 344|-> va_copy (last_ap, ap);
# 345| last_fmt = fmt;
# 346| }
Error: GCC_ANALYZER_WARNING (CWE-404): [#def85]
gmp-6.2.1/printf/doprnt.c:376:15: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
gmp-6.2.1/printf/doprnt.c:372:15: note: in expansion of macro 'FLUSH'
gmp-6.2.1/gmp-impl.h:4544:13: note: in definition of macro 'DOPRNT_ACCUMULATE'
gmp-6.2.1/printf/doprnt.c:373:34: note: in expansion of macro '__gmp_doprnt_mpf'
gmp-6.2.1/printf/doprnt.c:373:15: note: in expansion of macro 'DOPRNT_ACCUMULATE'
gmp-6.2.1/printf/doprnt.c:373:15: note: in expansion of macro 'DOPRNT_ACCUMULATE'
# 374| GMP_DECIMAL_POINT,
# 375| va_arg (ap, mpf_srcptr)));
# 376|-> va_copy (last_ap, ap);
# 377| last_fmt = fmt;
# 378| break;
Error: GCC_ANALYZER_WARNING (CWE-404): [#def86]
gmp-6.2.1/printf/doprnt.c:498:13: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
gmp-6.2.1/printf/doprnt.c:451:15: note: in expansion of macro 'FLUSH'
# 496| }
# 497| }
# 498|-> va_copy (last_ap, ap);
# 499| last_fmt = fmt;
# 500| goto next;
Error: CPPCHECK_WARNING (CWE-664): [#def87]
gmp-6.2.1/printf/doprnt.c:613: error[va_list_usedBeforeStarted]: va_list 'last_ap' used before va_start() was called.
# 611| TRACE (printf ("remainder: \"%s\"\n", last_fmt));
# 612| if (*last_fmt != '\0')
# 613|-> DOPRNT_FORMAT (last_fmt, last_ap);
# 614|
# 615| if (funs->final != NULL)
Error: GCC_ANALYZER_WARNING (CWE-404): [#def88]
gmp-6.2.1/printf/doprnt.c:621:10: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
# 619| done:
# 620| __GMP_FREE_FUNC_TYPE (alloc_fmt, alloc_fmt_size, char);
# 621|-> return retval;
# 622|
# 623| error:
Error: CPPCHECK_WARNING (CWE-664): [#def89]
gmp-6.2.1/printf/snprntffuns.c:75: error[va_list_usedBeforeStarted]: va_list 'ap' used before va_start() was called.
# 73| if (avail > 1)
# 74| {
# 75|-> va_copy (ap, orig_ap);
# 76| ret = vsnprintf (d->buf, avail, fmt, ap);
# 77| if (ret == -1)
Error: CPPCHECK_WARNING (CWE-664): [#def90]
gmp-6.2.1/printf/snprntffuns.c:76: error[va_list_usedBeforeStarted]: va_list 'ap' used before va_start() was called.
# 74| {
# 75| va_copy (ap, orig_ap);
# 76|-> ret = vsnprintf (d->buf, avail, fmt, ap);
# 77| if (ret == -1)
# 78| return ret;
Error: CPPCHECK_WARNING (CWE-664): [#def91]
gmp-6.2.1/printf/vasprintf.c:81: error[va_list_usedBeforeStarted]: va_list 'ap' used before va_start() was called.
# 79| GMP_ASPRINTF_T_NEED (d, space);
# 80| space = d->alloc - d->size;
# 81|-> va_copy (ap, orig_ap);
# 82| ret = vsnprintf (d->buf + d->size, space, fmt, ap);
# 83| if (ret == -1)
Error: CPPCHECK_WARNING (CWE-664): [#def92]
gmp-6.2.1/printf/vasprintf.c:82: error[va_list_usedBeforeStarted]: va_list 'ap' used before va_start() was called.
# 80| space = d->alloc - d->size;
# 81| va_copy (ap, orig_ap);
# 82|-> ret = vsnprintf (d->buf + d->size, space, fmt, ap);
# 83| if (ret == -1)
# 84| {
Error: COMPILER_WARNING: [#def93]
gmp-6.2.1/rand/randbui.c:38:36: warning[-Warray-parameter=]: argument 1 of type 'gmp_randstate_ptr' {aka '__gmp_randstate_struct *'} declared as a pointer
# 38 | gmp_urandomb_ui (gmp_randstate_ptr rstate, unsigned long bits)
# | ~~~~~~~~~~~~~~~~~~^~~~~~
gmp-6.2.1/gmp-impl.h:145: included_from: Included from here.
gmp-6.2.1/rand/randbui.c:31: included_from: Included from here.
gmp-6.2.1/gmp.h:527:47: note: previously declared as an array '__gmp_randstate_struct[1]'
# 527 | __GMP_DECLSPEC unsigned long gmp_urandomb_ui (gmp_randstate_t, unsigned long);
# | ^~~~~~~~~~~~~~~
# 36|
# 37| unsigned long
# 38|-> gmp_urandomb_ui (gmp_randstate_ptr rstate, unsigned long bits)
# 39| {
# 40| mp_limb_t a[LIMBS_PER_ULONG];
Error: COMPILER_WARNING: [#def94]
gmp-6.2.1/rand/randiset.c:35:37: warning[-Warray-parameter=]: argument 1 of type 'gmp_randstate_ptr' {aka '__gmp_randstate_struct *'} declared as a pointer
# 35 | gmp_randinit_set (gmp_randstate_ptr dst, gmp_randstate_srcptr src)
# | ~~~~~~~~~~~~~~~~~~^~~
gmp-6.2.1/gmp-impl.h:145: included_from: Included from here.
gmp-6.2.1/rand/randiset.c:31: included_from: Included from here.
gmp-6.2.1/gmp.h:515:39: note: previously declared as an array '__gmp_randstate_struct[1]'
# 515 | __GMP_DECLSPEC void gmp_randinit_set (gmp_randstate_t, const __gmp_randstate_struct *);
# | ^~~~~~~~~~~~~~~
# 33|
# 34| void
# 35|-> gmp_randinit_set (gmp_randstate_ptr dst, gmp_randstate_srcptr src)
# 36| {
# 37| (*((gmp_randfnptr_t *) RNG_FNPTR (src))->randiset_fn) (dst, src);
Error: COMPILER_WARNING (CWE-563): [#def95]
gmp-6.2.1/rand/randlc2x.c: scope_hint: In function 'lc'
gmp-6.2.1/rand/randlc2x.c:79:7: warning[-Wunused-but-set-variable]: variable 'cy' set but not used
# 79 | int cy;
# | ^~
# 77| unsigned long int m2exp;
# 78| unsigned long int bits;
# 79|-> int cy;
# 80| mp_size_t xn;
# 81| gmp_rand_lc_struct *p;
Error: COMPILER_WARNING: [#def96]
gmp-6.2.1/rand/randmt.c:396:45: warning[-Warray-parameter=]: argument 1 of type 'gmp_randstate_ptr' {aka '__gmp_randstate_struct *'} declared as a pointer
# 396 | __gmp_randinit_mt_noseed (gmp_randstate_ptr dst)
# | ~~~~~~~~~~~~~~~~~~^~~
gmp-6.2.1/rand/randmt.c:37: included_from: Included from here.
gmp-6.2.1/gmp-impl.h:1316:47: note: previously declared as an array '__gmp_randstate_struct[1]'
# 1316 | __GMP_DECLSPEC void __gmp_randinit_mt_noseed (gmp_randstate_t);
# | ^~~~~~~~~~~~~~~
# 394|
# 395| void
# 396|-> __gmp_randinit_mt_noseed (gmp_randstate_ptr dst)
# 397| {
# 398| const mp_size_t sz = ((sizeof (gmp_rand_mt_struct) - 1) / GMP_LIMB_BYTES) + 1;
Error: COMPILER_WARNING: [#def97]
gmp-6.2.1/rand/randmui.c:46:36: warning[-Warray-parameter=]: argument 1 of type 'gmp_randstate_ptr' {aka '__gmp_randstate_struct *'} declared as a pointer
# 46 | gmp_urandomm_ui (gmp_randstate_ptr rstate, unsigned long n)
# | ~~~~~~~~~~~~~~~~~~^~~~~~
gmp-6.2.1/gmp-impl.h:145: included_from: Included from here.
gmp-6.2.1/rand/randmui.c:31: included_from: Included from here.
gmp-6.2.1/gmp.h:530:47: note: previously declared as an array '__gmp_randstate_struct[1]'
# 530 | __GMP_DECLSPEC unsigned long gmp_urandomm_ui (gmp_randstate_t, unsigned long);
# | ^~~~~~~~~~~~~~~
# 44|
# 45| unsigned long
# 46|-> gmp_urandomm_ui (gmp_randstate_ptr rstate, unsigned long n)
# 47| {
# 48| mp_limb_t a[LIMBS_PER_ULONG];
Error: COMPILER_WARNING (CWE-563): [#def98]
gmp-6.2.1/scanf/doscan.c: scope_hint: In function '__gmp_doscan'
gmp-6.2.1/scanf/doscan.c:474:33: warning[-Wunused-but-set-variable]: variable 'end_fmt' set but not used
# 474 | const char *fmt, *this_fmt, *end_fmt;
# | ^~~~~~~
# 472| va_list ap;
# 473| char *alloc_fmt;
# 474|-> const char *fmt, *this_fmt, *end_fmt;
# 475| size_t orig_fmt_len, alloc_fmt_size, len;
# 476| int new_fields, new_chars;
Error: CPPCHECK_WARNING (CWE-664): [#def99]
gmp-6.2.1/scanf/doscan.c:490: error[va_list_usedBeforeStarted]: va_list 'ap' used before va_start() was called.
# 488| very small part of the total work, and we may as well keep applications
# 489| out of trouble. */
# 490|-> va_copy (ap, orig_ap);
# 491|
# 492| /* Parts of the format string are going to be copied so that a " %n" can
Error: CLANG_WARNING: [#def100]
gmp-6.2.1/scanf/doscan.c:502:3: warning[deadcode.DeadStores]: Value stored to 'end_fmt' is never read
# 500|
# 501| fmt = orig_fmt;
# 502|-> end_fmt = orig_fmt + orig_fmt_len;
# 503|
# 504| for (;;)
Error: GCC_ANALYZER_WARNING (CWE-404): [#def101]
gmp-6.2.1/scanf/doscan.c: scope_hint: In function '__gmp_doscan'
gmp-6.2.1/scanf/doscan.c:766:10: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
# 764| done:
# 765| (*__gmp_free_func) (alloc_fmt, alloc_fmt_size);
# 766|-> return fields;
# 767| }
Scan Properties
analyzer-version-clang | 18.1.3 |
analyzer-version-cppcheck | 2.13.0 |
analyzer-version-gcc | 14.0.1 |
analyzer-version-gcc-analyzer | 14.0.1 |
analyzer-version-shellcheck | 0.10.0 |
enabled-plugins | clang, cppcheck, gcc, shellcheck |
exit-code | 0 |
host | ip-172-16-1-201.us-west-2.compute.internal |
mock-config | fedora-41-x86_64 |
project-name | gmp-6.2.1-8.fc40 |
store-results-to | /tmp/tmpdqzf16tb/gmp-6.2.1-8.fc40.tar.xz |
time-created | 2024-04-22 10:50:38 |
time-finished | 2024-04-22 10:56:03 |
tool | csmock |
tool-args | '/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmpdqzf16tb/gmp-6.2.1-8.fc40.tar.xz' '--gcc-analyze' '/tmp/tmpdqzf16tb/gmp-6.2.1-8.fc40.src.rpm' |
tool-version | csmock-3.5.3-1.el9 |