diff options
author | Andreas Jaeger <aj@suse.de> | 2006-10-12 05:25:34 +0000 |
---|---|---|
committer | Andreas Jaeger <aj@suse.de> | 2006-10-12 05:25:34 +0000 |
commit | 251fc920c714e08bd960d517e733c6840e6d83d8 (patch) | |
tree | 7948a3103b22185a69229243136d37338a0e5bbb /math | |
parent | 46c38bd7dc34e104870982c64dae364b1a28b549 (diff) | |
download | glibc-251fc920c714e08bd960d517e733c6840e6d83d8.tar.gz |
2006-11-12 Joseph Myers <joseph@codesourcery.com>
* math/atest-exp.c (main): Cast hex value to mp_limb_t before
shifting.
* math/atest-exp2.c (read_mpn_hex): Likewise.
* math/atest-sincos.c (main): Likewise.
Diffstat (limited to 'math')
-rw-r--r-- | math/atest-exp.c | 8 | ||||
-rw-r--r-- | math/atest-exp2.c | 7 | ||||
-rw-r--r-- | math/atest-sincos.c | 10 |
3 files changed, 15 insertions, 10 deletions
diff --git a/math/atest-exp.c b/math/atest-exp.c index 158be4231a..2f168c9a6d 100644 --- a/math/atest-exp.c +++ b/math/atest-exp.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 2000, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Geoffrey Keating <Geoff.Keating@anu.edu.au>, 1997. @@ -171,8 +171,10 @@ main (void) memset (e2, '\0', sizeof (mp1)); for (i = -1; i < 100 && i < FRAC / 4; i++) - e2[(FRAC - i * 4 - 4) / mpbpl] |= ((strchr (hexdig, exp1[i + 1]) - hexdig) - << (FRAC - i * 4 - 4) % mpbpl); + e2[(FRAC - i * 4 - 4) / mpbpl] |= ((mp_limb_t) (strchr (hexdig, + exp1[i + 1]) + - hexdig) + << (FRAC - i * 4 - 4) % mpbpl); if (mpn_cmp (ex, e2, SZ) >= 0) mpn_sub_n (e3, ex, e2, SZ); diff --git a/math/atest-exp2.c b/math/atest-exp2.c index 33d942fc61..2c028a2b83 100644 --- a/math/atest-exp2.c +++ b/math/atest-exp2.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 2000, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Geoffrey Keating <Geoff.Keating@anu.edu.au>, 1997. @@ -73,8 +73,9 @@ read_mpn_hex(mp_limb_t *x, const char *str) memset (x, 0, sizeof (mp1)); for (i = -1; i < 100 && i < FRAC / 4; ++i) - x[(FRAC - i * 4 - 4) / mpbpl] |= ((strchr (hexdig, str[i + 1]) - hexdig) - << (FRAC - i * 4 - 4) % mpbpl); + x[(FRAC - i * 4 - 4) / mpbpl] |= ((mp_limb_t) (strchr (hexdig, str[i + 1]) + - hexdig) + << (FRAC - i * 4 - 4) % mpbpl); } static mp_limb_t *get_log2(void) __attribute__((const)); diff --git a/math/atest-sincos.c b/math/atest-sincos.c index 911aaec275..bef3521c96 100644 --- a/math/atest-sincos.c +++ b/math/atest-sincos.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 2000, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Geoffrey Keating <Geoff.Keating@anu.edu.au>, 1997. @@ -239,9 +239,11 @@ main (void) memset (c2, 0, sizeof (mp1)); for (i = 0; i < 100 && i < FRAC / 4; i++) { - s2[(FRAC - i * 4 - 4) / mpbpl] |= ((strchr (hexdig, sin1[i]) - hexdig) - << (FRAC - i * 4 - 4) % mpbpl); - c2[(FRAC - i * 4 - 4) / mpbpl] |= ((strchr (hexdig, cos1[i]) - hexdig) + s2[(FRAC - i * 4 - 4) / mpbpl] |= ((mp_limb_t) (strchr (hexdig, sin1[i]) + - hexdig) + << (FRAC - i * 4 - 4) % mpbpl); + c2[(FRAC - i * 4 - 4) / mpbpl] |= ((mp_limb_t) (strchr (hexdig, cos1[i]) + - hexdig) << (FRAC - i * 4 - 4) % mpbpl); } |