提交 2e6e0842 编写于 作者: A Alexander Monakov 提交者: Rich Felker

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.
上级 bc42dcbf
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册