Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/quad - change from size_t to unsigned int because w...
details: https://anonhg.NetBSD.org/src/rev/fd41453f9c11
branches: trunk
changeset: 778429:fd41453f9c11
user: christos <christos%NetBSD.org@localhost>
date: Sun Mar 25 19:53:18 2012 +0000
description:
- change from size_t to unsigned int because we don't need the extra width
- cast to unsigned int results of quad ops
diffstat:
lib/libc/quad/floatunditf_ieee754.c | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diffs (51 lines):
diff -r 5674db46d720 -r fd41453f9c11 lib/libc/quad/floatunditf_ieee754.c
--- a/lib/libc/quad/floatunditf_ieee754.c Sun Mar 25 18:50:19 2012 +0000
+++ b/lib/libc/quad/floatunditf_ieee754.c Sun Mar 25 19:53:18 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: floatunditf_ieee754.c,v 1.2 2011/07/09 03:16:40 matt Exp $ */
+/* $NetBSD: floatunditf_ieee754.c,v 1.3 2012/03/25 19:53:18 christos Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)floatunsdidf.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: floatunditf_ieee754.c,v 1.2 2011/07/09 03:16:40 matt Exp $");
+__RCSID("$NetBSD: floatunditf_ieee754.c,v 1.3 2012/03/25 19:53:18 christos Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -66,8 +66,8 @@
#else
union ieee_ext_u extu;
quad_t tmp = x; /* must be signed */
- size_t width = 64;
- size_t bit = 0;
+ unsigned int width = 64;
+ unsigned int bit = 0;
quad_t mask = ~(quad_t)0;
if (x == 0)
@@ -87,17 +87,17 @@
x <<= (bit + 1);
extu.extu_sign = 0;
extu.extu_exp = EXT_EXP_BIAS + (64 - (bit + 1));
- extu.extu_frach = x >> (64 - EXT_FRACHBITS);
+ extu.extu_frach = (unsigned int)(x >> (64 - EXT_FRACHBITS));
x <<= EXT_FRACHBITS;
#ifdef EXT_FRACHMBITS
- extu.extu_frachm = x >> (64 - EXT_FRACHMBITS);
+ extu.extu_frachm =(unsigned int)(x >> (64 - EXT_FRACHMBITS));
x <<= EXT_FRACHMBITS;
#endif
#ifdef EXT_FRACLMBITS
- extu.extu_fraclm = x >> (64 - EXT_FRACLMBITS);
+ extu.extu_fraclm =(unsigned int)(x >> (64 - EXT_FRACLMBITS));
x <<= EXT_FRACLMBITS;
#endif
- extu.extu_fracl = x >> (64 - EXT_FRACLBITS);
+ extu.extu_fracl =(unsigned int)(x >> (64 - EXT_FRACLBITS));
return extu.extu_ld;
#endif
Home |
Main Index |
Thread Index |
Old Index