py,extmod: Some casts and minor refactors to quiet compiler warnings.

This commit is contained in:
Tom Collins
2017-06-30 16:23:29 -07:00
committed by Damien George
parent ed52955c6b
commit 145796f037
9 changed files with 20 additions and 24 deletions

View File

@@ -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++ = '.';