Blame SOURCES/libmpc-fix-uninit-var.patch
|
|
32f595 |
From aed9d68b2a7e6622a7d0037d25d69d486a33825c Mon Sep 17 00:00:00 2001
|
|
|
32f595 |
From: Marek Polacek <polacek@redhat.com>
|
|
|
32f595 |
Date: Thu, 8 Oct 2020 16:27:55 -0400
|
|
|
32f595 |
Subject: [PATCH] Fix reading uninitialized value. Remove dead assignment.
|
|
|
32f595 |
|
|
|
32f595 |
* src/atan.c (mpc_atan): Initialize OK to zero.
|
|
|
32f595 |
* src/pow.c (mpc_pow): Remove dead assignment.
|
|
|
32f595 |
---
|
|
|
32f595 |
src/atan.c | 2 +-
|
|
|
32f595 |
src/pow.c | 1 -
|
|
|
32f595 |
2 files changed, 1 insertion(+), 2 deletions(-)
|
|
|
32f595 |
|
|
|
32f595 |
diff --git a/src/atan.c b/src/atan.c
|
|
|
32f595 |
index cc1922b..4e71f6f 100644
|
|
|
32f595 |
--- a/src/atan.c
|
|
|
32f595 |
+++ b/src/atan.c
|
|
|
32f595 |
@@ -143,7 +143,7 @@ mpc_atan (mpc_ptr rop, mpc_srcptr op, mpc_rnd_t rnd)
|
|
|
32f595 |
mpfr_rnd_t rnd_im, rnd_away;
|
|
|
32f595 |
mpfr_t y, z;
|
|
|
32f595 |
mpfr_prec_t p, p_im;
|
|
|
32f595 |
- int ok;
|
|
|
32f595 |
+ int ok = 0;
|
|
|
32f595 |
|
|
|
32f595 |
rnd_im = MPC_RND_IM (rnd);
|
|
|
32f595 |
mpfr_init (y);
|
|
|
32f595 |
diff --git a/src/pow.c b/src/pow.c
|
|
|
32f595 |
index 4fc90ae..0fc6932 100644
|
|
|
32f595 |
--- a/src/pow.c
|
|
|
32f595 |
+++ b/src/pow.c
|
|
|
32f595 |
@@ -685,7 +685,6 @@ mpc_pow (mpc_ptr z, mpc_srcptr x, mpc_sr
|
|
|
32f595 |
int inex_re, inex_im;
|
|
|
32f595 |
/* under- and overflow flags are set by mpc_exp */
|
|
|
32f595 |
mpc_set (z, u, MPC_RNDNN);
|
|
|
32f595 |
- ret = ret_exp;
|
|
|
32f595 |
inex_re = MPC_INEX_RE(ret_exp);
|
|
|
32f595 |
inex_im = MPC_INEX_IM(ret_exp);
|
|
|
32f595 |
if (mpfr_inf_p (mpc_realref (z)))
|