From 8bf492f12707777c321dcf40494f757947649f62 Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Sat, 12 Aug 2017 09:35:35 +0900 Subject: Reduce integer type mismatch warnings in VC. --- src/fmt_fp.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/fmt_fp.c') 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; -- cgit v1.2.3