Commit ef6a762d authored by Tomasz Dąbrowski's avatar Tomasz Dąbrowski

fix fmt_fp.c(224) : warning C4244: '=' : conversion from 'ptrdiff_t' to 'int',...

fix fmt_fp.c(224) : warning C4244: '=' : conversion from 'ptrdiff_t' to 'int', possible loss of data
parent bac37a9f
...@@ -221,7 +221,7 @@ fmt_fp(struct fmt_args *f, long double y, ptrdiff_t p, uint8_t fl, int t) ...@@ -221,7 +221,7 @@ fmt_fp(struct fmt_args *f, long double y, ptrdiff_t p, uint8_t fl, int t)
else e=0; else e=0;
/* Perform rounding: j is precision after the radix (possibly neg) */ /* 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)) { if (j < 9*(z-r-1)) {
uint32_t x; uint32_t x;
/* We avoid C's broken division of negative numbers */ /* We avoid C's broken division of negative numbers */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment