Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/gen Add a pair of casts to silence lint about conve...
details: https://anonhg.NetBSD.org/src/rev/d18fb23c8b5c
branches: trunk
changeset: 778331:d18fb23c8b5c
user: he <he%NetBSD.org@localhost>
date: Thu Mar 22 13:25:45 2012 +0000
description:
Add a pair of casts to silence lint about conversion possibly losing bits.
diffstat:
lib/libc/gen/modf_ieee754.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (20 lines):
diff -r 6fbb78ce9040 -r d18fb23c8b5c lib/libc/gen/modf_ieee754.c
--- a/lib/libc/gen/modf_ieee754.c Thu Mar 22 13:15:48 2012 +0000
+++ b/lib/libc/gen/modf_ieee754.c Thu Mar 22 13:25:45 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: modf_ieee754.c,v 1.3 2010/01/27 14:10:41 drochner Exp $ */
+/* $NetBSD: modf_ieee754.c,v 1.4 2012/03/22 13:25:45 he Exp $ */
/*
* Copyright (c) 1994, 1995 Carnegie-Mellon University.
@@ -92,8 +92,8 @@
frac = ((u_int64_t)v.dblu_dbl.dbl_frach << 32) + v.dblu_dbl.dbl_fracl;
frac >>= DBL_FRACBITS - (u.dblu_dbl.dbl_exp - DBL_EXP_BIAS);
frac <<= DBL_FRACBITS - (u.dblu_dbl.dbl_exp - DBL_EXP_BIAS);
- v.dblu_dbl.dbl_fracl = frac & 0xffffffff;
- v.dblu_dbl.dbl_frach = frac >> 32;
+ v.dblu_dbl.dbl_fracl = (u_int) (frac & 0xffffffffULL);
+ v.dblu_dbl.dbl_frach = (u_int) (frac >> 32);
*iptr = v.dblu_d;
u.dblu_d -= v.dblu_d;
Home |
Main Index |
Thread Index |
Old Index