summaryrefslogtreecommitdiff
path: root/nuttx/lib
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-10-06 00:27:17 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-10-06 00:27:17 +0000
commit1aad2537e6adf2a72a69329a555b97cb9ed48f88 (patch)
tree629340a73378571a03f97c478f1a3b3639a0e3ed /nuttx/lib
parent2e66123ab1f9038be35c34f689a47c35e94c6176 (diff)
downloadpx4-nuttx-1aad2537e6adf2a72a69329a555b97cb9ed48f88.tar.gz
px4-nuttx-1aad2537e6adf2a72a69329a555b97cb9ed48f88.tar.bz2
px4-nuttx-1aad2537e6adf2a72a69329a555b97cb9ed48f88.zip
Eliminate a warning
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5216 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/lib')
-rw-r--r--nuttx/lib/stdio/lib_libvsprintf.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/nuttx/lib/stdio/lib_libvsprintf.c b/nuttx/lib/stdio/lib_libvsprintf.c
index 2bf095880..30c988599 100644
--- a/nuttx/lib/stdio/lib_libvsprintf.c
+++ b/nuttx/lib/stdio/lib_libvsprintf.c
@@ -1169,7 +1169,9 @@ int lib_vsprintf(FAR struct lib_outstream_s *obj, FAR const char *src, va_list a
FAR char *ptmp;
#ifndef CONFIG_NOPRINTF_FIELDWIDTH
int width;
+#ifdef CONFIG_LIBC_FLOATINGPOINT
int trunc;
+#endif
uint8_t fmt;
#endif
uint8_t flags;
@@ -1212,8 +1214,10 @@ int lib_vsprintf(FAR struct lib_outstream_s *obj, FAR const char *src, va_list a
#ifndef CONFIG_NOPRINTF_FIELDWIDTH
fmt = FMT_RJUST;
width = 0;
+#ifdef CONFIG_LIBC_FLOATINGPOINT
trunc = 0;
#endif
+#endif
/* Process each format qualifier. */
@@ -1260,8 +1264,10 @@ int lib_vsprintf(FAR struct lib_outstream_s *obj, FAR const char *src, va_list a
int value = va_arg(ap, int);
if (IS_HASDOT(flags))
{
+#ifdef CONFIG_LIBC_FLOATINGPOINT
trunc = value;
SET_HASASTERISKTRUNC(flags);
+#endif
}
else
{
@@ -1300,7 +1306,9 @@ int lib_vsprintf(FAR struct lib_outstream_s *obj, FAR const char *src, va_list a
if (IS_HASDOT(flags))
{
+#ifdef CONFIG_LIBC_FLOATINGPOINT
trunc = n;
+#endif
}
else
{