From ef6a762d41f40e1580e94a7e8e5a23df7af4d6a4 Mon Sep 17 00:00:00 2001 From: Tomasz Dąbrowski Date: Fri, 25 Aug 2017 14:14:17 +0200 Subject: fix fmt_fp.c(224) : warning C4244: '=' : conversion from 'ptrdiff_t' to 'int', possible loss of data --- src/fmt_fp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/fmt_fp.c b/src/fmt_fp.c index 37f7c7a4b..bfaec05c9 100644 --- a/src/fmt_fp.c +++ b/src/fmt_fp.c @@ -221,7 +221,7 @@ fmt_fp(struct fmt_args *f, long double y, ptrdiff_t p, uint8_t fl, int t) else e=0; /* Perform rounding: j is precision after the radix (possibly neg) */ - j = p - ((t|32)!='f')*e - ((t|32)=='g' && p); + j = (int)p - ((t|32)!='f')*e - ((t|32)=='g' && p); if (j < 9*(z-r-1)) { uint32_t x; /* We avoid C's broken division of negative numbers */ -- cgit v1.2.3