diff options
author | rhaas <rhaas@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2013-07-04 19:15:38 +0000 |
---|---|---|
committer | rhaas <rhaas@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2013-07-04 19:15:38 +0000 |
commit | 1279ba68756d636460f03c2509010815b4420776 (patch) | |
tree | f469fc7709b02d627d3296910b51d87ca352b906 /src/util | |
parent | 842c0eb1622a6dddafcf4fc3d36c0e14a01539c1 (diff) |
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
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/snprintf.c | 3 |
1 files changed, 2 insertions, 1 deletions
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 |