aboutsummaryrefslogtreecommitdiffstats
path: root/os
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2014-02-09 08:44:55 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2014-02-09 08:44:55 +0000
commitfa017d8b3f8a01076e70c957e7fb1681ea36abf8 (patch)
tree24e5f214b21b6c6be703da168dc6a1f90c5cf5c7 /os
parenta66c2164c25ed026baaed51d209b5e9c8ee28263 (diff)
downloadChibiOS-fa017d8b3f8a01076e70c957e7fb1681ea36abf8.tar.gz
ChibiOS-fa017d8b3f8a01076e70c957e7fb1681ea36abf8.tar.bz2
ChibiOS-fa017d8b3f8a01076e70c957e7fb1681ea36abf8.zip
Fixed a warning in chprintf() using the IAR compiler.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/kernel_3_dev@6679 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os')
-rw-r--r--os/various/chprintf.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/os/various/chprintf.c b/os/various/chprintf.c
index 190a7defa..0feee72c3 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);
@@ -281,7 +281,7 @@ unsigned_common:
* @param[in] str pointer to a buffer
* @param[in] size maximum size of the buffer
* @param[in] fmt formatting string
- * @param[in] ap list of parameters
+ * @return The size of the generated string.
*
* @api
*/