Fixed a warning in chprintf() using the IAR compiler.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@6678 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
parent
90f832679c
commit
6459ba4c95
|
@ -77,10 +77,10 @@ static char *ftoa(char *p, double num) {
|
||||||
long l;
|
long l;
|
||||||
unsigned long precision = FLOAT_PRECISION;
|
unsigned long precision = FLOAT_PRECISION;
|
||||||
|
|
||||||
l = num;
|
l = (long)num;
|
||||||
p = long_to_string_with_divisor(p, l, 10, 0);
|
p = long_to_string_with_divisor(p, l, 10, 0);
|
||||||
*p++ = '.';
|
*p++ = '.';
|
||||||
l = (num - l) * precision;
|
l = (long)((num - l) * precision);
|
||||||
return long_to_string_with_divisor(p, l, 10, precision / 10);
|
return long_to_string_with_divisor(p, l, 10, precision / 10);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -250,8 +250,8 @@ unsigned_common:
|
||||||
chSequentialStreamPut(chp, (uint8_t)filler);
|
chSequentialStreamPut(chp, (uint8_t)filler);
|
||||||
while (++width != 0);
|
while (++width != 0);
|
||||||
}
|
}
|
||||||
while (--i >= 0)
|
chSequentialStreamWrite(chp, (uint8_t*)s, i);
|
||||||
chSequentialStreamPut(chp, (uint8_t)*s++);
|
s += i;
|
||||||
|
|
||||||
while (width) {
|
while (width) {
|
||||||
chSequentialStreamPut(chp, (uint8_t)filler);
|
chSequentialStreamPut(chp, (uint8_t)filler);
|
||||||
|
|
Loading…
Reference in New Issue