diff options
author | zimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4> | 2008-05-22 11:05:19 +0000 |
---|---|---|
committer | zimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4> | 2008-05-22 11:05:19 +0000 |
commit | aa9825b1f6f9525fb72ee20f2d5a99cd681c012b (patch) | |
tree | 458d9f422e74b8b2740ba3eec070c549906b807d | |
parent | c4a7352106c9b6e6b1faea61409146071bf00981 (diff) | |
download | mpfr-aa9825b1f6f9525fb72ee20f2d5a99cd681c012b.tar.gz |
Added comments about int i = i trick to avoid warning about uninitialized
variables. This has the advantage to generate no code, but works for gcc only.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@5359 280ebfd0-de03-0410-8827-d642c229c3f4
-rw-r--r-- | lngamma.c | 5 | ||||
-rw-r--r-- | sub1sp.c | 4 |
2 files changed, 6 insertions, 3 deletions
@@ -157,8 +157,9 @@ GAMMA_FUNC (mpfr_ptr y, mpfr_srcptr z0, mp_rnd_t rnd) mp_prec_t precy, w; /* working precision */ mpfr_t s, t, u, v, z; unsigned long m, k, maxm; - mpz_t *B = NULL; /* initialize to NULL to get rid of false compiler warning - with gcc <= 4.3 */ + mpz_t *B = NULL; /* Initialize to NULL to get rid of false compiler warning + with gcc <= 4.3. Another way (with gcc), is to initialize + to B, but other compilers might not like it. */ int inexact, compared; mp_exp_t err_s, err_t; unsigned long Bm = 0; /* number of allocated B[] */ @@ -145,7 +145,9 @@ mpfr_sub1sp (mpfr_ptr a, mpfr_srcptr b, mpfr_srcptr c, mp_rnd_t rnd_mode) mp_limb_t bbcp = (mp_limb_t) -1, bbcp1 = (mp_limb_t) -1; /* Cp+1 and C'p+2, gcc claims that they might be used uninitialized. We fill them with invalid - values, which should produce a failure if so. */ + values, which should produce a failure if so. + Alternatively, we could write bbcp = bbcp, + bbcp1 = bbcp1, but this works for gcc only. */ MPFR_TMP_DECL(marker); |