Source-Changes-HG archive

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

[src/trunk]: src/regress/lib/libc/ieeefp/testfloat rcsid, WARNS, don't occasi...



details:   https://anonhg.NetBSD.org/src/rev/dfb7f46ddb37
branches:  trunk
changeset: 507079:dfb7f46ddb37
user:      ross <ross%NetBSD.org@localhost>
date:      Tue Mar 13 06:45:24 2001 +0000

description:
rcsid, WARNS, don't occasionally fprintf or fputc a \r

diffstat:

 regress/lib/libc/ieeefp/testfloat/fail.c      |   3 ++-
 regress/lib/libc/ieeefp/testfloat/systfloat.c |   1 +
 regress/lib/libc/ieeefp/testfloat/testCases.c |  23 ++++++++++++++---------
 3 files changed, 17 insertions(+), 10 deletions(-)

diffs (102 lines):

diff -r 567021dce600 -r dfb7f46ddb37 regress/lib/libc/ieeefp/testfloat/fail.c
--- a/regress/lib/libc/ieeefp/testfloat/fail.c  Tue Mar 13 06:39:30 2001 +0000
+++ b/regress/lib/libc/ieeefp/testfloat/fail.c  Tue Mar 13 06:45:24 2001 +0000
@@ -1,3 +1,4 @@
+/* $NetBSD: fail.c,v 1.2 2001/03/13 06:45:24 ross Exp $ */
 
 /*
 ===============================================================================
@@ -29,7 +30,7 @@
 #include "milieu.h"
 #include "fail.h"
 
-char *fail_programName = "";
+const char *fail_programName = "";
 
 void fail( const char *message, ... )
 {
diff -r 567021dce600 -r dfb7f46ddb37 regress/lib/libc/ieeefp/testfloat/systfloat.c
--- a/regress/lib/libc/ieeefp/testfloat/systfloat.c     Tue Mar 13 06:39:30 2001 +0000
+++ b/regress/lib/libc/ieeefp/testfloat/systfloat.c     Tue Mar 13 06:45:24 2001 +0000
@@ -1,3 +1,4 @@
+/* $NetBSD: systfloat.c,v 1.2 2001/03/13 06:45:24 ross Exp $ */
 
 /*
 ===============================================================================
diff -r 567021dce600 -r dfb7f46ddb37 regress/lib/libc/ieeefp/testfloat/testCases.c
--- a/regress/lib/libc/ieeefp/testfloat/testCases.c     Tue Mar 13 06:39:30 2001 +0000
+++ b/regress/lib/libc/ieeefp/testfloat/testCases.c     Tue Mar 13 06:45:24 2001 +0000
@@ -1,3 +1,4 @@
+/* $NetBSD: testCases.c,v 1.2 2001/03/13 06:45:24 ross Exp $ */
 
 /*
 ===============================================================================
@@ -23,11 +24,13 @@
 ===============================================================================
 */
 
+#include <stdlib.h>
+
 #include "milieu.h"
 #include "fail.h"
-#include "random.h"
 #include "softfloat.h"
 #include "testCases.h"
+#include "random.h"
 
 typedef struct {
     int16 expNum, term1Num, term2Num;
@@ -1136,7 +1139,8 @@
      case 7:
         return float32RandomQInfPInf();
     }
-
+    abort();
+    return 0;
 }
 
 #ifdef BITS64
@@ -1711,7 +1715,8 @@
      case 7:
         return float64RandomQInfPInf();
     }
-
+    abort();
+    return 0;
 }
 
 #ifdef FLOATX80
@@ -2265,8 +2270,8 @@
         & LIT64( 0x7FFFFFFFFFFFFFFF );
     weightMaskNum = randomUint8() % floatx80NumQInfWeightMasks;
     z.high =
-          randomUint16() & floatx80QInfWeightMasks[ weightMaskNum ]
-        + floatx80QInfWeightOffsets[ weightMaskNum ];
+          randomUint16() & (floatx80QInfWeightMasks[ weightMaskNum ]
+        + floatx80QInfWeightOffsets[ weightMaskNum ]);
     if ( z.high ) z.low |= LIT64( 0x8000000000000000 );
     z.high |= ( (uint16) ( randomUint8() & 1 ) )<<15;
     return z;
@@ -2281,8 +2286,8 @@
     z.low = randomUint64() & LIT64( 0x7FFFFFFFFFFFFFFF );
     weightMaskNum = randomUint8() % floatx80NumQInfWeightMasks;
     z.high =
-          randomUint16() & floatx80QInfWeightMasks[ weightMaskNum ]
-        + floatx80QInfWeightOffsets[ weightMaskNum ];
+          randomUint16() & (floatx80QInfWeightMasks[ weightMaskNum ]
+        + floatx80QInfWeightOffsets[ weightMaskNum ]);
     if ( z.high ) z.low |= LIT64( 0x8000000000000000 );
     z.high |= ( (uint16) ( randomUint8() & 1 ) )<<15;
     return z;
@@ -2304,9 +2309,9 @@
      case 6:
         return floatx80RandomQInfP3();
      case 7:
-        return floatx80RandomQInfPInf();
+       break;
     }
-
+    return floatx80RandomQInfPInf();
 }
 
 #endif



Home | Main Index | Thread Index | Old Index