diff options
| author | Tom Collins | 2017-06-30 16:23:29 -0700 |
|---|---|---|
| committer | Damien George | 2017-07-07 11:32:22 +1000 |
| commit | 145796f037715e180b441b38c1ec1ba45ff77797 (patch) | |
| tree | c709871f107f103dfdccd7c6975cd4f07a006477 /py/formatfloat.c | |
| parent | ed52955c6bb05d2a08c009ed24ab3214c88c6fb1 (diff) | |
py,extmod: Some casts and minor refactors to quiet compiler warnings.
Diffstat (limited to 'py/formatfloat.c')
| -rw-r--r-- | py/formatfloat.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/py/formatfloat.c b/py/formatfloat.c index b16746b39..ea5a07977 100644 --- a/py/formatfloat.c +++ b/py/formatfloat.c @@ -332,7 +332,7 @@ int mp_format_float(FPTYPE f, char *buf, size_t buf_size, char fmt, int prec, ch // Print the digits of the mantissa for (int i = 0; i < num_digits; ++i, --dec) { - int32_t d = f; + int32_t d = (int32_t)f; *s++ = '0' + d; if (dec == 0 && prec > 0) { *s++ = '.'; |
