mirror of
git://git.musl-libc.org/musl
synced 2025-01-24 07:33:15 +00:00
remove ineffective compiler assist from printf
The switch statement has no 'default:' case and the function ends immediately following the switch, so the extra comparison did not communicate any extra information to the compiler.
This commit is contained in:
parent
bc42dcbfd9
commit
2e6e08423b
@ -107,8 +107,6 @@ union arg
|
||||
|
||||
static void pop_arg(union arg *arg, int type, va_list *ap)
|
||||
{
|
||||
/* Give the compiler a hint for optimizing the switch. */
|
||||
if ((unsigned)type > MAXSTATE) return;
|
||||
switch (type) {
|
||||
case PTR: arg->p = va_arg(*ap, void *);
|
||||
break; case INT: arg->i = va_arg(*ap, int);
|
||||
|
@ -98,8 +98,6 @@ union arg
|
||||
|
||||
static void pop_arg(union arg *arg, int type, va_list *ap)
|
||||
{
|
||||
/* Give the compiler a hint for optimizing the switch. */
|
||||
if ((unsigned)type > MAXSTATE) return;
|
||||
switch (type) {
|
||||
case PTR: arg->p = va_arg(*ap, void *);
|
||||
break; case INT: arg->i = va_arg(*ap, int);
|
||||
|
Loading…
Reference in New Issue
Block a user