libc/stdio: Skip fetch double argument if !CONFIG_LIBC_FLOATINGPOINT && CONFIG_LIBC_NUMBERED_ARGS

since the argument is already fetched by lib_vsprintf in this case

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2022-03-08 16:34:23 +08:00 committed by Alan Carvalho de Assis
parent 0c01f0ce5a
commit 428ce93ee5

View File

@ -937,7 +937,9 @@ static int vsprintf_internal(FAR struct lib_outstream_s *stream,
#else /* !CONFIG_LIBC_FLOATINGPOINT */
if ((c >= 'E' && c <= 'G') || (c >= 'e' && c <= 'g'))
{
# ifndef CONFIG_LIBC_NUMBERED_ARGS
va_arg(ap, double);
# endif
pnt = "*float*";
size = sizeof("*float*") - 1;
goto str_lpad;