From 7cc33af2dc1137ef819b589e51e3756bdaa222e1 Mon Sep 17 00:00:00 2001 From: Yasuhiro Matsumoto Date: Tue, 22 Dec 2015 17:29:10 +0900 Subject: fix build on VS2012 --- src/fmt_fp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/fmt_fp.c') diff --git a/src/fmt_fp.c b/src/fmt_fp.c index b20eb895f..61c7a4cc9 100644 --- a/src/fmt_fp.c +++ b/src/fmt_fp.c @@ -156,7 +156,7 @@ fmt_fp(struct fmt_args *f, long double y, int w, int p, int fl, int t) s=buf; do { - int x=y; + int x=(int)y; *s++=xdigits[x]|(t&32); y=16*(y-x); if (s-buf==1 && (y||p>0||(fl&ALT_FORM))) *s++='.'; @@ -184,7 +184,7 @@ fmt_fp(struct fmt_args *f, long double y, int w, int p, int fl, int t) else a=r=z=big+sizeof(big)/sizeof(*big) - LDBL_MANT_DIG - 1; do { - *z = y; + *z = (uint32_t)y; y = 1000000000*(y-*z++); } while (y); @@ -194,7 +194,7 @@ fmt_fp(struct fmt_args *f, long double y, int w, int p, int fl, int t) for (d=z-1; d>=a; d--) { uint64_t x = ((uint64_t)*d<a && !z[-1]) z--; -- cgit v1.2.3