diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2017-08-12 09:35:35 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2017-08-12 09:35:35 +0900 |
| commit | 8bf492f12707777c321dcf40494f757947649f62 (patch) | |
| tree | d03211047847039b1f3387a00d2a76c53e46c98e /src/fmt_fp.c | |
| parent | baa5d2e3f72cb036c8c4e4f434b584998caaaa2c (diff) | |
| download | mruby-8bf492f12707777c321dcf40494f757947649f62.tar.gz mruby-8bf492f12707777c321dcf40494f757947649f62.zip | |
Reduce integer type mismatch warnings in VC.
Diffstat (limited to 'src/fmt_fp.c')
| -rw-r--r-- | src/fmt_fp.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/fmt_fp.c b/src/fmt_fp.c index 483e04c39..440a50071 100644 --- a/src/fmt_fp.c +++ b/src/fmt_fp.c @@ -61,7 +61,7 @@ out(struct fmt_args *f, const char *s, size_t l) #define PAD_SIZE 256 static void -pad(struct fmt_args *f, char c, int w, int l, int fl) +pad(struct fmt_args *f, char c, int w, int l, uint8_t fl) { char pad[PAD_SIZE]; if (fl & (LEFT_ADJ | ZERO_PAD) || l >= w) return; @@ -91,13 +91,14 @@ typedef char compiler_defines_long_double_incorrectly[9-(int)sizeof(long double) #endif static int -fmt_fp(struct fmt_args *f, long double y, int w, int p, int fl, int t) +fmt_fp(struct fmt_args *f, long double y, int w, int p, uint8_t fl, int t) { uint32_t big[(LDBL_MANT_DIG+28)/29 + 1 // mantissa expansion + (LDBL_MAX_EXP+LDBL_MANT_DIG+28+8)/9]; // exponent expansion uint32_t *a, *d, *r, *z; uint32_t i; - int e2=0, e, j, l; + int e2=0, e, j; + ptrdiff_t l; char buf[9+LDBL_MANT_DIG/4], *s; const char *prefix="-0X+0X 0X-0x+0x 0x"; int pl; |
