Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libc/arch/m68k/gen cpoy from the 040 version: -Wshadow w...



details:   https://anonhg.NetBSD.org/src/rev/3aa37008f402
branches:  trunk
changeset: 517142:3aa37008f402
user:      drochner <drochner%NetBSD.org@localhost>
date:      Wed Nov 07 17:55:42 2001 +0000

description:
cpoy from the 040 version: -Wshadow warning fix

diffstat:

 lib/libc/arch/m68k/gen/ldexp_softfloat.c |  24 ++++++++++++------------
 1 files changed, 12 insertions(+), 12 deletions(-)

diffs (85 lines):

diff -r 11b29dc53956 -r 3aa37008f402 lib/libc/arch/m68k/gen/ldexp_softfloat.c
--- a/lib/libc/arch/m68k/gen/ldexp_softfloat.c  Wed Nov 07 17:46:21 2001 +0000
+++ b/lib/libc/arch/m68k/gen/ldexp_softfloat.c  Wed Nov 07 17:55:42 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ldexp_softfloat.c,v 1.1 2001/05/17 21:46:26 fredette Exp $     */
+/*     $NetBSD: ldexp_softfloat.c,v 1.2 2001/11/07 17:55:42 drochner Exp $     */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
 
 #include <sys/cdefs.h>
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: ldexp_softfloat.c,v 1.1 2001/05/17 21:46:26 fredette Exp $");
+__RCSID("$NetBSD: ldexp_softfloat.c,v 1.2 2001/11/07 17:55:42 drochner Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #include <sys/types.h>
@@ -50,9 +50,9 @@
  * Multiply the given value by 2^exp.
  */
 double
-ldexp(val, exp)
+ldexp(val, exp2)
        double val;
-       int exp;
+       int exp2;
 {
        register int oldexp, newexp;
        union {
@@ -74,17 +74,17 @@
                 * u.v is denormal.  We must adjust it so that the exponent
                 * arithmetic below will work.
                 */
-               if (exp <= DBL_EXP_BIAS) {
+               if (exp2 <= DBL_EXP_BIAS) {
                        /*
                         * Optimization: if the scaling can be done in a single
                         * multiply, or underflows, just do it now.
                         */
-                       if (exp <= -DBL_FRACBITS) {
+                       if (exp2 <= -DBL_FRACBITS) {
                                errno = ERANGE;
                                return (0.0);
                        }
                        mul.v = 0.0;
-                       mul.s.dbl_exp = exp + DBL_EXP_BIAS;
+                       mul.s.dbl_exp = exp2 + DBL_EXP_BIAS;
                        u.v *= mul.v;
                        if (u.v == 0.0) {
                                errno = ERANGE;
@@ -100,7 +100,7 @@
                        mul.v = 0.0;
                        mul.s.dbl_exp = DBL_FRACBITS + DBL_EXP_BIAS;
                        u.v *= mul.v;
-                       exp -= DBL_FRACBITS;
+                       exp2 -= DBL_FRACBITS;
                        oldexp = u.s.dbl_exp;
                }
        }
@@ -109,7 +109,7 @@
         * u.v is now normalized and oldexp has been adjusted if necessary.
         * Calculate the new exponent and check for underflow and overflow.
         */
-       newexp = oldexp + exp;
+       newexp = oldexp + exp2;
 
        if (newexp <= 0) {
                /*
@@ -126,12 +126,12 @@
                 * adjust the exponent first.  This is safe because we know
                 * that u.v is normal at this point.
                 */
-               if (exp <= -DBL_EXP_BIAS) {
+               if (exp2 <= -DBL_EXP_BIAS) {
                        u.s.dbl_exp = 1;
-                       exp += oldexp - 1;
+                       exp2 += oldexp - 1;
                }
                mul.v = 0.0;
-               mul.s.dbl_exp = exp + DBL_EXP_BIAS;
+               mul.s.dbl_exp = exp2 + DBL_EXP_BIAS;
                u.v *= mul.v;
                return (u.v);
        } else if (newexp >= DBL_EXP_INFNAN) {



Home | Main Index | Thread Index | Old Index