From: qwert Date: Fri, 18 Jul 2008 14:35:17 +0000 (+0000) Subject: Fix some warning in printf reduced. X-Git-Tag: 2.0.0~430 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=f736a4877b8a420223c14da06be6ffe48772d44f;p=bertos.git Fix some warning in printf reduced. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@1504 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/bertos/mware/formatwr.c b/bertos/mware/formatwr.c index 0a36cee8..ac2cbffe 100644 --- a/bertos/mware/formatwr.c +++ b/bertos/mware/formatwr.c @@ -899,13 +899,22 @@ FLOATING_CONVERSION: CONVERSION_LOOP: #if CONFIG_PRINTF > PRINTF_NOMODIFIERS if (h_modifier) - u_val = (format_flag == 'd') ? - (short)va_arg(ap, int) : (unsigned short)va_arg(ap, int); + { + if (format_flag == 'd') + u_val = (short)va_arg(ap, int); + else + u_val = (unsigned short)va_arg(ap, int); + } else if (l_modifier) u_val = va_arg(ap, long); else - u_val = (format_flag == 'd') ? - va_arg(ap,int) : va_arg(ap,unsigned int); + { + if (format_flag == 'd') + u_val = va_arg(ap, int); + else + u_val = va_arg(ap, unsigned int); + } + #else /* CONFIG_PRINTF > PRINTF_NOMODIFIERS */ u_val = va_arg(ap,int); #endif /* CONFIG_PRINTF > PRINTF_NOMODIFIERS */