mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
fix fmt_fp.c(206) : warning C4244: 'initializing' : conversion from 'ptrdiff_t' to 'int', possible loss of data
This commit is contained in:
+1
-1
@@ -203,7 +203,7 @@ fmt_fp(struct fmt_args *f, long double y, ptrdiff_t p, uint8_t fl, int t)
|
||||
}
|
||||
while (e2<0) {
|
||||
uint32_t carry=0, *b;
|
||||
int sh=MIN(9,-e2), need=1+(p+LDBL_MANT_DIG/3+8)/9;
|
||||
int sh=MIN(9,-e2), need=1+((int)p+LDBL_MANT_DIG/3+8)/9;
|
||||
for (d=a; d<z; d++) {
|
||||
uint32_t rm = *d & ((1<<sh)-1);
|
||||
*d = (*d>>sh) + carry;
|
||||
|
||||
Reference in New Issue
Block a user