diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2013-11-21 02:02:54 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2013-11-21 02:02:54 +0000 |
commit | 370b26653bb02328e914927e67c693ba46c64a5f (patch) | |
tree | 2a842e7ce08c15394e39f740fe65ba98655e9954 /src/lngamma.c | |
parent | 9e9041a2f1d2f1ca9ecac3b7ceaafbeabbe9e574 (diff) | |
download | mpfr-370b26653bb02328e914927e67c693ba46c64a5f.tar.gz |
[src/lngamma.c] No longer declare B as initialized with GCC (see r5534),
as the "may be used uninitialized" warning no longer occurs with latest
GCC: trunk revision 203899 (Debian 20131021-1), for the future GCC 4.9.
The warning still occurs with GCC 4.8.2 (Debian 4.8.2-1):
$ gcc-4.8 -O2 -Wall -c gamma.c
In file included from gamma.c:27:0:
gamma.c: In function ‘mpfr_gamma’:
lngamma.c:468:17: warning: ‘B’ may be used uninitialized in this function [-Wmaybe-uninitialized]
B = mpfr_bernoulli_internal (B, m); /* B[2m]*(2m+1)!, exact */
^
lngamma.c:165:10: note: ‘B’ was declared here
mpz_t *B;
^
Note: with GCC 4.8.2, at least -O is needed to reproduce the warning,
and -Wmaybe-uninitialized without -Wuninitialized (or -Wall) doesn't
trigger the warning.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@8714 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'src/lngamma.c')
-rw-r--r-- | src/lngamma.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lngamma.c b/src/lngamma.c index 67c693b18..9346146a0 100644 --- a/src/lngamma.c +++ b/src/lngamma.c @@ -162,7 +162,7 @@ GAMMA_FUNC (mpfr_ptr y, mpfr_srcptr z0, mpfr_rnd_t rnd) mpfr_prec_t precy, w; /* working precision */ mpfr_t s, t, u, v, z; unsigned long m, k, maxm; - mpz_t *INITIALIZED(B); /* variable B declared as initialized */ + mpz_t *B; int compared; int inexact = 0; /* 0 means: result y not set yet */ mpfr_exp_t err_s, err_t; |