@@ -1577,7 +1577,6 @@ static void evaluate_assign_to(struct expression *left, struct symbol *type)
static struct symbol *evaluate_assignment(struct expression *expr)
{
struct expression *left = expr->left;
- struct expression *where = expr;
struct symbol *ltype;
if (!lvalue_expression(left)) {
@@ -1591,7 +1590,7 @@ static struct symbol *evaluate_assignment(struct expression *expr)
if (!evaluate_assign_op(expr))
return NULL;
} else {
- if (!compatible_assignment_types(where, ltype, &expr->right, "assignment"))
+ if (!compatible_assignment_types(expr, ltype, &expr->right, "assignment"))
return NULL;
}
In evaluate_assignment(), a local variable (named 'where') contains the input expression (named 'expr', like in most other function). This is doubly confusing because: *) both variables hold the same pointer. *) the name 'where' is normally used for a string with extra information for error messages. So, remove this intermediate and use the original 'expr' instead. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com> --- evaluate.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)