Re: [PATCH] cleanup: remove evaluate_arguments()'s unused argument

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Nov 3, 2016 at 1:16 AM, Luc Van Oostenryck
<luc.vanoostenryck@xxxxxxxxx> wrote:
> Was slightly confusing when reading some code.
> Better to remove it.
>
> @@ -2885,7 +2885,7 @@ static struct symbol *evaluate_call(struct expression *expr)
>                 if (!sym->op->args(expr))
>                         return NULL;
>         } else {
> -               if (!evaluate_arguments(sym, ctype, arglist))
> +               if (!evaluate_arguments(ctype, arglist))
>                         return NULL;

I think this is more or less fine, even though sym is not currently
used in evaluate_arguments().
ctype contain the function declare which usually is in a line earlier
than the call expression.
The "sym" argument in the most common case contain the symbol node,
the ctype contain
the base function type.

One case might be useful for "exvaluate_arguments" to use symbol node
is to output
the beginning position of the call expression. The "fn" symbol point
to the previous line
and arglist in the later part of the expression.

As I said, the node argument is currently not used. If you feel
strongly about it
I am fine with removing it as well.

Or maybe change it to "node" instead of "f", will that be better to understand?

Chris
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux