gmp-6.3.0-1.fc41
List of Defects
Error: COMPILER_WARNING: [#def1]
gmp-6.3.0/conftest.s: scope_hint: Assembler messages
gmp-6.3.0/conftest.s:2: Error: no such instruction: `somelabel'
Error: COMPILER_WARNING: [#def2]
gmp-6.3.0/conftest.s: scope_hint: Assembler messages
gmp-6.3.0/conftest.s:3: Error: unknown pseudo-op: `.def'
Error: COMPILER_WARNING: [#def3]
gmp-6.3.0/conftest.s:4: Error: unknown pseudo-op: `.scl'
Error: COMPILER_WARNING: [#def4]
gmp-6.3.0/conftest.s:5: Error: Missing symbol name in directive
Error: COMPILER_WARNING: [#def5]
gmp-6.3.0/conftest.s:5: Error: unrecognized symbol type "32"
Error: COMPILER_WARNING: [#def6]
gmp-6.3.0/conftest.s:6: Error: unknown pseudo-op: `.endef'
Error: COMPILER_WARNING (CWE-1164): [#def7]
gmp-6.3.0/cxx/ismpf.cc: scope_hint: In function 'std::istream& operator>>(std::istream&, mpf_ptr)'
gmp-6.3.0/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.3.0/cxx/osdoprnti.cc: scope_hint: In function 'std::ostream& __gmp_doprnt_integer_ostream(std::ostream&, doprnt_params_t*, char*)'
gmp-6.3.0/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.3.0/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.3.0/cxx/osmpf.cc: scope_hint: In function 'std::ostream& operator<<(std::ostream&, mpf_srcptr)'
gmp-6.3.0/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.3.0/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.3.0/extract-dbl.c: scope_hint: In function '__gmp_extract_double'
gmp-6.3.0/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: GCC_ANALYZER_WARNING (CWE-401): [#def13]
gmp-6.3.0/gen-sieve.c: scope_hint: In function ‘generate’
gmp-6.3.0/gen-sieve.c:93:1: warning[-Wanalyzer-malloc-leak]: leak of ‘limb[0]._mp_d’
gmp-6.3.0/gen-sieve.c:34: included_from: Included from here.
gmp-6.3.0/bootstrap.c:33: included_from: Included from here.
gmp-6.3.0/mini-gmp/mini-gmp.c:3724:12: note: in expansion of macro ‘MPZ_REALLOC’
gmp-6.3.0/mini-gmp/mini-gmp.c:3724:12: note: in expansion of macro ‘MPZ_REALLOC’
gmp-6.3.0/mini-gmp/mini-gmp.c:3724:12: note: in expansion of macro ‘MPZ_REALLOC’
gmp-6.3.0/mini-gmp/mini-gmp.c:3724:12: note: in expansion of macro ‘MPZ_REALLOC’
gmp-6.3.0/mini-gmp/mini-gmp.c:371:19: note: in expansion of macro ‘gmp_alloc’
gmp-6.3.0/mini-gmp/mini-gmp.c:45: included_from: Included from here.
gmp-6.3.0/mini-gmp/mini-gmp.c:371:19: note: in expansion of macro ‘gmp_alloc’
gmp-6.3.0/mini-gmp/mini-gmp.c:1473:7: note: in expansion of macro ‘GMP_ABS’
gmp-6.3.0/mini-gmp/mini-gmp.c:71:33: note: in definition of macro ‘GMP_ABS’
gmp-6.3.0/mini-gmp/mini-gmp.c:3724:12: note: in expansion of macro ‘MPZ_REALLOC’
# 91|
# 92| return c;
# 93|-> }
# 94|
# 95| void
Error: CLANG_WARNING: [#def14]
gmp-6.3.0/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: [#def15]
gmp-6.3.0/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: [#def16]
gmp-6.3.0/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: [#def17]
gmp-6.3.0/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): [#def18]
gmp-6.3.0/mpn/generic/toom_interpolate_5pts.c:38: included_from: Included from here.
gmp-6.3.0/mpn/generic/toom_interpolate_5pts.c: scope_hint: In function '__gmpn_toom_interpolate_5pts'
gmp-6.3.0/gmp-impl.h:1723:6: warning[-Wunused-value]: value computed is not used
# 1723 | (3 & mpn_bdiv_dbm1 (dst, src, size, __GMP_CAST (mp_limb_t, GMP_NUMB_MASK / 3)))
# | ^
gmp-6.3.0/gmp-impl.h:2525:33: note: in definition of macro 'ASSERT_NOCARRY'
# 2525 | #define ASSERT_NOCARRY(expr) (expr)
# | ^~~~
gmp-6.3.0/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 */
# | ^~~~~~~~~~~~~~~~
# 1721| #undef mpn_divexact_by3
# 1722| #define mpn_divexact_by3(dst,src,size) \
# 1723|-> (3 & mpn_bdiv_dbm1 (dst, src, size, __GMP_CAST (mp_limb_t, GMP_NUMB_MASK / 3)))
# 1724| /* override mpn_divexact_by3c defined in gmp.h */
# 1725| /*
Error: COMPILER_WARNING (CWE-563): [#def19]
gmp-6.3.0/gmp-impl.h:1734:6: warning[-Wunused-value]: value computed is not used
# 1734 | (7 & 3 * mpn_bdiv_dbm1 (dst, src, size, __GMP_CAST (mp_limb_t, GMP_NUMB_MASK / 5)))
# | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gmp-6.3.0/mpn/generic/mulmod_bknp1.c:337:5: note: in expansion of macro 'mpn_divexact_by5'
# 337 | mpn_divexact_by5 (tp, tp, n + 1);
# | ^~~~~~~~~~~~~~~~
# 1732| #if GMP_NUMB_BITS % 4 == 0
# 1733| #define mpn_divexact_by5(dst,src,size) \
# 1734|-> (7 & 3 * mpn_bdiv_dbm1 (dst, src, size, __GMP_CAST (mp_limb_t, GMP_NUMB_MASK / 5)))
# 1735| #endif
# 1736|
Error: COMPILER_WARNING (CWE-563): [#def20]
gmp-6.3.0/gmp-impl.h:1759:7: warning[-Wunused-value]: value computed is not used
# 1759 | (15 & 1 * mpn_bdiv_dbm1 (dst, src, size, __GMP_CAST (mp_limb_t, GMP_NUMB_MASK / 15)))
# | ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gmp-6.3.0/mpn/generic/toom_interpolate_7pts.c:212:3: note: in expansion of macro 'mpn_divexact_by15'
# 212 | mpn_divexact_by15 (w1, w1, m);
# | ^~~~~~~~~~~~~~~~~
# 1757| #if GMP_NUMB_BITS % 4 == 0
# 1758| #define mpn_divexact_by15(dst,src,size) \
# 1759|-> (15 & 1 * mpn_bdiv_dbm1 (dst, src, size, __GMP_CAST (mp_limb_t, GMP_NUMB_MASK / 15)))
# 1760| #endif
# 1761|
Error: COMPILER_WARNING (CWE-563): [#def21]
gmp-6.3.0/gmp-impl.h:1764:7: warning[-Wunused-value]: value computed is not used
# 1764 | (31 & 15 * mpn_bdiv_dbm1 (dst, src, size, __GMP_CAST (mp_limb_t, GMP_NUMB_MASK / 17)))
# | ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gmp-6.3.0/mpn/generic/mulmod_bknp1.c:348:5: note: in expansion of macro 'mpn_divexact_by17'
# 348 | mpn_divexact_by17 (tp, tp, n + 1);
# | ^~~~~~~~~~~~~~~~~
# 1762| #if GMP_NUMB_BITS % 8 == 0
# 1763| #define mpn_divexact_by17(dst,src,size) \
# 1764|-> (31 & 15 * mpn_bdiv_dbm1 (dst, src, size, __GMP_CAST (mp_limb_t, GMP_NUMB_MASK / 17)))
# 1765| #endif
# 1766|
Error: GCC_ANALYZER_WARNING (CWE-471): [#def22]
gmp-6.3.0/bootstrap.c:33: included_from: Included from here.
gmp-6.3.0/gen-fib.c:32: included_from: Included from here.
gmp-6.3.0/mini-gmp/mini-gmp.c: scope_hint: In function ‘mpn_add_1’
gmp-6.3.0/mini-gmp/mini-gmp.c:458:13: warning[-Wanalyzer-write-to-const]: write to ‘const’ object ‘dummy_limb’
gmp-6.3.0/mini-gmp/mini-gmp.c:1509:7: note: in expansion of macro ‘MPZ_REALLOC’
gmp-6.3.0/mini-gmp/mini-gmp.c:1509:7: note: in expansion of macro ‘MPZ_REALLOC’
gmp-6.3.0/mini-gmp/mini-gmp.c:1509:7: note: in expansion of macro ‘MPZ_REALLOC’
gmp-6.3.0/mini-gmp/mini-gmp.c:1473:7: note: in expansion of macro ‘GMP_ABS’
gmp-6.3.0/mini-gmp/mini-gmp.c:71:33: note: in definition of macro ‘GMP_ABS’
gmp-6.3.0/mini-gmp/mini-gmp.c:1509:7: note: in expansion of macro ‘MPZ_REALLOC’
gmp-6.3.0/mini-gmp/mini-gmp.c:45: included_from: Included from here.
gmp-6.3.0/mini-gmp/mini-gmp.c:1433:26: note: declared here
# 456| /* Carry out */
# 457| b = (r < b);
# 458|-> rp[i] = r;
# 459| }
# 460| while (++i < n);
Error: CPPCHECK_WARNING (CWE-758): [#def23]
gmp-6.3.0/mini-gmp/mini-gmp.c:1513: error[shiftTooManyBits]: Shifting 64-bit value by 64 bits is undefined behaviour
# 1511| {
# 1512| int LOCAL_GMP_LIMB_BITS = GMP_LIMB_BITS;
# 1513|-> while (x >>= LOCAL_GMP_LIMB_BITS)
# 1514| {
# 1515| ++ r->_mp_size;
Error: CPPCHECK_WARNING (CWE-758): [#def24]
gmp-6.3.0/mini-gmp/mini-gmp.c:1635: error[shiftTooManyBits]: Shifting 64-bit value by 64 bits is undefined behaviour
# 1633| n = GMP_MIN (n, 1 + (mp_size_t) (GMP_ULONG_BITS - 1) / GMP_LIMB_BITS);
# 1634| while (--n >= 0)
# 1635|-> r = (r << LOCAL_GMP_LIMB_BITS) + u->_mp_d[n];
# 1636| return r;
# 1637| }
Error: CLANG_WARNING: [#def25]
gmp-6.3.0/gen-psqr.c:34: included_from: Included from here.
gmp-6.3.0/bootstrap.c:33: included_from: Included from here.
gmp-6.3.0/mini-gmp/mini-gmp.c:3684:6: warning[core.uninitialized.Assign]: Assigned value is garbage or undefined
# 3682| int bit;
# 3683|
# 3684|-> ds = d->_mp_size;
# 3685| dn = GMP_ABS (ds);
# 3686| limb_index = bit_index / GMP_LIMB_BITS;
Error: CLANG_WARNING: [#def26]
gmp-6.3.0/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: CLANG_WARNING: [#def27]
gmp-6.3.0/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: [#def28]
gmp-6.3.0/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: [#def29]
gmp-6.3.0/mpn/generic/compute_powtab.c:112:46: warning[core.BitwiseShift]: Left shift by '18446744073709551615' overflows the capacity of 'size_t'
# 110| else
# 111| {
# 112|-> if (((digits_in_base + chars_per_limb) << (n_pows-2)) <= exptab[0])
# 113| {
# 114| /* 3, sometimes adjusted to 4. */
Error: CLANG_WARNING: [#def30]
gmp-6.3.0/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: [#def31]
gmp-6.3.0/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: [#def32]
gmp-6.3.0/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): [#def33]
gmp-6.3.0/mpn/generic/gcdext.c: scope_hint: In function '__gmpn_gcdext'
gmp-6.3.0/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.3.0/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: [#def34]
gmp-6.3.0/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): [#def35]
gmp-6.3.0/mpn/generic/invertappr.c: scope_hint: In function '__gmpn_ni_invertappr'
gmp-6.3.0/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: [#def36]
gmp-6.3.0/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): [#def37]
gmp-6.3.0/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): [#def38]
gmp-6.3.0/mpn/generic/matrix22_mul1_inverse_vector.c: scope_hint: In function '__gmpn_matrix22_mul1_inverse_vector'
gmp-6.3.0/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: [#def39]
gmp-6.3.0/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: [#def40]
gmp-6.3.0/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: [#def41]
gmp-6.3.0/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: [#def42]
gmp-6.3.0/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: [#def43]
gmp-6.3.0/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: CLANG_WARNING: [#def44]
gmp-6.3.0/mpn/generic/mu_divappr_q.c:269:4: warning[deadcode.DeadStores]: Value stored to 'cy' is never read
# 267| /* This is executed with about 76% probability. */
# 268| mpn_incr_u (qp, 1);
# 269|-> cy = mpn_sub_n (rp, rp, dp, dn);
# 270| STAT (err++);
# 271| }
Error: CLANG_WARNING: [#def45]
gmp-6.3.0/mpn/generic/mul_fft.c:875:12: warning[deadcode.DeadStores]: Although the value stored to 'cc' is used in the enclosing expression, the value is never actually read from 'cc'
# 873| if (cc == -CNST_LIMB(1))
# 874| {
# 875|-> if ((cc = mpn_add_1 (p + pla - pl, p + pla - pl, pl, CNST_LIMB(1))))
# 876| {
# 877| /* p[pla-pl]...p[pla-1] are all zero */
Error: CLANG_WARNING: [#def46]
gmp-6.3.0/mpn/generic/mulmod_bnm1.c:337:4: warning[deadcode.DeadStores]: Value stored to 'cy' is never read
# 335| ASSERT (an + bn == rn - 1 ||
# 336| mpn_zero_p (xp + an + bn - n + 1, rn - 1 - (an + bn)));
# 337|-> cy = mpn_sub_1 (rp, rp, an + bn, cy);
# 338| ASSERT (cy == (xp + an + bn - n)[0]);
# 339| }
Error: COMPILER_WARNING (CWE-457): [#def47]
gmp-6.3.0/mpn/generic/remove.c: scope_hint: In function '__gmpn_remove'
gmp-6.3.0/mpn/generic/remove.c:141:12: warning[-Wmaybe-uninitialized]: 'np' may be used uninitialized
# 141 | np += pn;
# | ~~~^~~~~
gmp-6.3.0/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: [#def48]
gmp-6.3.0/mpn/generic/rootrem.c:300:3: warning[-Wanalyzer-imprecise-fp-arithmetic]: use of floating-point arithmetic here might yield unexpected results
gmp-6.3.0/mpn/generic/rootrem.c:300:3: note: in expansion of macro 'TMP_ALLOC_LIMBS_3'
gmp-6.3.0/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: [#def49]
gmp-6.3.0/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): [#def50]
gmp-6.3.0/mpn/generic/rootrem.c: scope_hint: In function 'mpn_rootrem_internal'
gmp-6.3.0/mpn/generic/rootrem.c:514:10: warning[-Wmaybe-uninitialized]: 'rn' may be used uninitialized
# 514 | return rn;
# | ^~
gmp-6.3.0/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: [#def51]
gmp-6.3.0/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: [#def52]
gmp-6.3.0/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): [#def53]
gmp-6.3.0/mpn/generic/sec_div.c: scope_hint: In function '__gmpn_sec_div_r'
gmp-6.3.0/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: [#def54]
gmp-6.3.0/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: [#def55]
gmp-6.3.0/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: [#def56]
gmp-6.3.0/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: [#def57]
gmp-6.3.0/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: [#def58]
gmp-6.3.0/mpn/generic/sqrmod_bnm1.c:293:4: warning[deadcode.DeadStores]: Value stored to 'cy' is never read
# 291| xp + 2*an - n, rn - 2*an, cy);
# 292| ASSERT (mpn_zero_p (xp + 2*an - n+1, rn - 1 - 2*an));
# 293|-> cy = mpn_sub_1 (rp, rp, 2*an, cy);
# 294| ASSERT (cy == (xp + 2*an - n)[0]);
# 295| }
Error: CLANG_WARNING: [#def59]
gmp-6.3.0/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: [#def60]
gmp-6.3.0/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: [#def61]
gmp-6.3.0/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): [#def62]
gmp-6.3.0/mpn/generic/toom_interpolate_12pts.c: scope_hint: In function '__gmpn_toom_interpolate_12pts'
gmp-6.3.0/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.3.0/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: [#def63]
gmp-6.3.0/mpn/fat_addmul_2.c:10: included_from: Included from here.
gmp-6.3.0/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.3.0/mpn/x86_64/fat/addmul_2.c:31: included_from: Included from here.
gmp-6.3.0/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.3.0/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: CLANG_WARNING: [#def64]
gmp-6.3.0/mpz/aorsmul.c:154:4: warning[deadcode.DeadStores]: Value stored to 'wsize' is never read
# 152| tsize = wsize;
# 153|
# 154|-> wsize = usize;
# 155| wsize_signed = -wsize_signed;
# 156| }
Error: CLANG_WARNING: [#def65]
gmp-6.3.0/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: [#def66]
gmp-6.3.0/mpz/nextprime.c:229:17: warning[core.uninitialized.Assign]: Assigned value is garbage or undefined
# 227| for (; m < odds_in_composite_sieve; m += prime)
# 228| composite[m] = 1;
# 229|-> prime += primegap[i];
# 230| }
# 231|
Error: CPPCHECK_WARNING (CWE-457): [#def67]
gmp-6.3.0/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: CPPCHECK_WARNING (CWE-664): [#def68]
gmp-6.3.0/printf/doprnt.c:174: error[va_list_usedBeforeStarted]: va_list 'ap' used before va_start() was called.
# 172| very small part of the total work, and we may as well keep applications
# 173| out of trouble. */
# 174|-> va_copy (ap, orig_ap);
# 175|
# 176| /* The format string is chopped up into pieces to be passed to
Error: CPPCHECK_WARNING (CWE-664): [#def69]
gmp-6.3.0/printf/doprnt.c:194: error[va_list_usedBeforeStarted]: va_list 'ap' used before va_start() was called.
# 192| the next output will begin, when that's done */
# 193| last_fmt = fmt;
# 194|-> va_copy (last_ap, ap);
# 195|
# 196| for (;;)
Error: CPPCHECK_WARNING (CWE-664): [#def70]
gmp-6.3.0/printf/doprnt.c:194: error[va_list_usedBeforeStarted]: va_list 'last_ap' used before va_start() was called.
# 192| the next output will begin, when that's done */
# 193| last_fmt = fmt;
# 194|-> va_copy (last_ap, ap);
# 195|
# 196| for (;;)
Error: GCC_ANALYZER_WARNING (CWE-404): [#def71]
gmp-6.3.0/printf/doprnt.c: scope_hint: In function '__gmp_doprnt'
gmp-6.3.0/printf/doprnt.c:206:7: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
# 204| /* this_fmt and this_ap are the current '%' sequence being considered */
# 205| this_fmt = fmt;
# 206|-> va_copy (this_ap, ap);
# 207| fmt++; /* skip the '%' */
# 208|
Error: GCC_ANALYZER_WARNING (CWE-404): [#def72]
gmp-6.3.0/printf/doprnt.c:343:17: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
gmp-6.3.0/printf/doprnt.c:320:15: note: in expansion of macro 'FLUSH'
gmp-6.3.0/gmp-impl.h:145: included_from: Included from here.
gmp-6.3.0/printf/doprnt.c:65: included_from: Included from here.
gmp-6.3.0/printf/doprnt.c:321:25: note: in expansion of macro 'mpq_get_str'
gmp-6.3.0/printf/doprnt.c:342:17: note: in expansion of macro 'DOPRNT_ACCUMULATE'
gmp-6.3.0/printf/doprnt.c:342:17: note: in expansion of macro 'DOPRNT_ACCUMULATE'
# 341| __GMP_FREE_FUNC_TYPE (gmp_str, strlen(gmp_str)+1, char);
# 342| DOPRNT_ACCUMULATE (ret);
# 343|-> va_copy (last_ap, ap);
# 344| last_fmt = fmt;
# 345| }
Error: GCC_ANALYZER_WARNING (CWE-404): [#def73]
gmp-6.3.0/printf/doprnt.c:375:15: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
gmp-6.3.0/printf/doprnt.c:371:15: note: in expansion of macro 'FLUSH'
gmp-6.3.0/gmp-impl.h:4612:13: note: in definition of macro 'DOPRNT_ACCUMULATE'
gmp-6.3.0/printf/doprnt.c:372:34: note: in expansion of macro '__gmp_doprnt_mpf'
gmp-6.3.0/printf/doprnt.c:372:15: note: in expansion of macro 'DOPRNT_ACCUMULATE'
gmp-6.3.0/printf/doprnt.c:372:15: note: in expansion of macro 'DOPRNT_ACCUMULATE'
# 373| GMP_DECIMAL_POINT,
# 374| va_arg (ap, mpf_srcptr)));
# 375|-> va_copy (last_ap, ap);
# 376| last_fmt = fmt;
# 377| break;
Error: GCC_ANALYZER_WARNING (CWE-404): [#def74]
gmp-6.3.0/printf/doprnt.c:497:13: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
gmp-6.3.0/printf/doprnt.c:450:15: note: in expansion of macro 'FLUSH'
# 495| }
# 496| }
# 497|-> va_copy (last_ap, ap);
# 498| last_fmt = fmt;
# 499| goto next;
Error: CPPCHECK_WARNING (CWE-664): [#def75]
gmp-6.3.0/printf/doprnt.c:612: error[va_list_usedBeforeStarted]: va_list 'last_ap' used before va_start() was called.
# 610| TRACE (printf ("remainder: \"%s\"\n", last_fmt));
# 611| if (*last_fmt != '\0')
# 612|-> DOPRNT_FORMAT (last_fmt, last_ap);
# 613|
# 614| if (funs->final != NULL)
Error: GCC_ANALYZER_WARNING (CWE-404): [#def76]
gmp-6.3.0/printf/doprnt.c:620:10: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
# 618| done:
# 619| __GMP_FREE_FUNC_TYPE (alloc_fmt, alloc_fmt_size, char);
# 620|-> return retval;
# 621|
# 622| error:
Error: CPPCHECK_WARNING (CWE-664): [#def77]
gmp-6.3.0/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): [#def78]
gmp-6.3.0/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): [#def79]
gmp-6.3.0/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): [#def80]
gmp-6.3.0/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 (CWE-563): [#def81]
gmp-6.3.0/scanf/doscan.c: scope_hint: In function '__gmp_doscan'
gmp-6.3.0/scanf/doscan.c:473:33: warning[-Wunused-variable]: unused variable 'end_fmt'
# 473 | const char *fmt, *this_fmt, *end_fmt;
# | ^~~~~~~
# 471| va_list ap;
# 472| char *alloc_fmt;
# 473|-> const char *fmt, *this_fmt, *end_fmt;
# 474| size_t orig_fmt_len, alloc_fmt_size, len;
# 475| int new_fields, new_chars;
Error: CPPCHECK_WARNING (CWE-664): [#def82]
gmp-6.3.0/scanf/doscan.c:489: error[va_list_usedBeforeStarted]: va_list 'ap' used before va_start() was called.
# 487| very small part of the total work, and we may as well keep applications
# 488| out of trouble. */
# 489|-> va_copy (ap, orig_ap);
# 490|
# 491| /* Parts of the format string are going to be copied so that a " %n" can
Error: GCC_ANALYZER_WARNING (CWE-404): [#def83]
gmp-6.3.0/scanf/doscan.c: scope_hint: In function '__gmp_doscan'
gmp-6.3.0/scanf/doscan.c:765:10: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
# 763| done:
# 764| (*__gmp_free_func) (alloc_fmt, alloc_fmt_size);
# 765|-> return fields;
# 766| }
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.3.0-1.fc41 |
store-results-to | /tmp/tmpzemw8hvr/gmp-6.3.0-1.fc41.tar.xz |
time-created | 2024-04-22 10:56:30 |
time-finished | 2024-04-22 11:01:58 |
tool | csmock |
tool-args | '/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmpzemw8hvr/gmp-6.3.0-1.fc41.tar.xz' '--gcc-analyze' '/tmp/tmpzemw8hvr/gmp-6.3.0-1.fc41.src.rpm' |
tool-version | csmock-3.5.3-1.el9 |