mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-01 02:55:07 +08:00
Eliminate a warning
git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5216 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
@@ -1169,7 +1169,9 @@ int lib_vsprintf(FAR struct lib_outstream_s *obj, FAR const char *src, va_list a
|
|||||||
FAR char *ptmp;
|
FAR char *ptmp;
|
||||||
#ifndef CONFIG_NOPRINTF_FIELDWIDTH
|
#ifndef CONFIG_NOPRINTF_FIELDWIDTH
|
||||||
int width;
|
int width;
|
||||||
|
#ifdef CONFIG_LIBC_FLOATINGPOINT
|
||||||
int trunc;
|
int trunc;
|
||||||
|
#endif
|
||||||
uint8_t fmt;
|
uint8_t fmt;
|
||||||
#endif
|
#endif
|
||||||
uint8_t flags;
|
uint8_t flags;
|
||||||
@@ -1212,7 +1214,9 @@ int lib_vsprintf(FAR struct lib_outstream_s *obj, FAR const char *src, va_list a
|
|||||||
#ifndef CONFIG_NOPRINTF_FIELDWIDTH
|
#ifndef CONFIG_NOPRINTF_FIELDWIDTH
|
||||||
fmt = FMT_RJUST;
|
fmt = FMT_RJUST;
|
||||||
width = 0;
|
width = 0;
|
||||||
|
#ifdef CONFIG_LIBC_FLOATINGPOINT
|
||||||
trunc = 0;
|
trunc = 0;
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Process each format qualifier. */
|
/* 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);
|
int value = va_arg(ap, int);
|
||||||
if (IS_HASDOT(flags))
|
if (IS_HASDOT(flags))
|
||||||
{
|
{
|
||||||
|
#ifdef CONFIG_LIBC_FLOATINGPOINT
|
||||||
trunc = value;
|
trunc = value;
|
||||||
SET_HASASTERISKTRUNC(flags);
|
SET_HASASTERISKTRUNC(flags);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
else
|
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))
|
if (IS_HASDOT(flags))
|
||||||
{
|
{
|
||||||
|
#ifdef CONFIG_LIBC_FLOATINGPOINT
|
||||||
trunc = n;
|
trunc = n;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user