From 1279ba68756d636460f03c2509010815b4420776 Mon Sep 17 00:00:00 2001 From: rhaas Date: Thu, 4 Jul 2013 19:15:38 +0000 Subject: use lrint and casts to avoid compiler warnings about type conversion git-svn-id: http://svn.cactuscode.org/flesh/trunk@5030 17b73243-c579-4c4c-a9d2-2d5706c11dac --- src/util/snprintf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/util') diff --git a/src/util/snprintf.c b/src/util/snprintf.c index 6ae9e24d..e12740b2 100644 --- a/src/util/snprintf.c +++ b/src/util/snprintf.c @@ -688,8 +688,9 @@ static int fmtfp (char *buffer, size_t *currlen, size_t maxlen, if (fracpart >= mypow10 (max)) { + LDOUBLE fmax = mypow10 (max); intpart++; - fracpart -= (long)mypow10 (max); + fracpart -= (long)fmax; } #ifdef DEBUG_SNPRINTF -- cgit v1.2.3