py,extmod: Some casts and minor refactors to quiet compiler warnings.
This commit is contained in:
committed by
Damien George
parent
ed52955c6b
commit
145796f037
@@ -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++ = '.';
|
||||
|
||||
Reference in New Issue
Block a user