diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2014-02-09 08:44:50 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2014-02-09 08:44:50 +0000 |
commit | 6459ba4c95422999ed98de2ad6fd55fc567e103e (patch) | |
tree | ca6c184be6b4734487c97ef86f6d5ed0b5085bb4 /os | |
parent | 90f832679c659c669bd468cc49355df84445d905 (diff) | |
download | ChibiOS-6459ba4c95422999ed98de2ad6fd55fc567e103e.tar.gz ChibiOS-6459ba4c95422999ed98de2ad6fd55fc567e103e.tar.bz2 ChibiOS-6459ba4c95422999ed98de2ad6fd55fc567e103e.zip |
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
Diffstat (limited to 'os')
-rw-r--r-- | os/various/chprintf.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/os/various/chprintf.c b/os/various/chprintf.c index 73bc1e33d..08d313dac 100644 --- a/os/various/chprintf.c +++ b/os/various/chprintf.c @@ -77,10 +77,10 @@ static char *ftoa(char *p, double num) { long l;
unsigned long precision = FLOAT_PRECISION;
- l = num;
+ l = (long)num;
p = long_to_string_with_divisor(p, l, 10, 0);
*p++ = '.';
- l = (num - l) * precision;
+ l = (long)((num - l) * precision);
return long_to_string_with_divisor(p, l, 10, precision / 10);
}
#endif
@@ -250,8 +250,8 @@ unsigned_common: chSequentialStreamPut(chp, (uint8_t)filler);
while (++width != 0);
}
- while (--i >= 0)
- chSequentialStreamPut(chp, (uint8_t)*s++);
+ chSequentialStreamWrite(chp, (uint8_t*)s, i);
+ s += i;
while (width) {
chSequentialStreamPut(chp, (uint8_t)filler);
|