From f845c83aa47cb31ccc341477e192d1390f72fa85 Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Thu, 4 Aug 2022 20:49:08 -0700 Subject: [PATCH] expr: remove further unused parameters from 'Exdisc_t.reff' I guess when I committed ef3ed2a98a46d0641d936c62fde78e719cef98f8 it was not obvious to me that this is entirely part of private internal interfaces and the callback signature involved is not exposed publicly. --- lib/expr/exgram.h | 3 +-- lib/expr/exparse.y | 2 +- lib/expr/expr.h | 2 +- lib/expr/extoken.c | 2 +- lib/gvpr/compile.c | 5 +---- 5 files changed, 5 insertions(+), 9 deletions(-) diff --git a/lib/expr/exgram.h b/lib/expr/exgram.h index 85e58ab09..cf5dad23b 100644 --- a/lib/expr/exgram.h +++ b/lib/expr/exgram.h @@ -398,8 +398,7 @@ static Exnode_t *makeVar(Expr_t * prog, Exid_t * s, Exnode_t * idx, exerror("%s: identifier references not supported", sym->name); else if (expr.program->disc->reff) (*expr.program->disc->reff) (prog, nn, - nn->data.variable.symbol, refs, - NULL, EX_SCALAR); + nn->data.variable.symbol, refs); return nn; } diff --git a/lib/expr/exparse.y b/lib/expr/exparse.y index 09a9126ab..1d86eeda7 100644 --- a/lib/expr/exparse.y +++ b/lib/expr/exparse.y @@ -1009,7 +1009,7 @@ constant : CONSTANT if (!expr.program->disc->reff) exerror("%s: identifier references not supported", $1->name); else - $$->data.constant.value = (*expr.program->disc->reff)(expr.program, $$, $1, NULL, NULL, EX_SCALAR); + $$->data.constant.value = (*expr.program->disc->reff)(expr.program, $$, $1, NULL); } | FLOATING { diff --git a/lib/expr/expr.h b/lib/expr/expr.h index 933299c20..fe6aa21c9 100644 --- a/lib/expr/expr.h +++ b/lib/expr/expr.h @@ -215,7 +215,7 @@ struct Exdisc_s /* discipline */ Exerror_f errorf; /* error function */ Extype_t (*getf)(Expr_t*, Exnode_t*, Exid_t*, Exref_t*, void*, int, Exdisc_t*); /* get value function */ - Extype_t (*reff)(Expr_t*, Exnode_t*, Exid_t*, Exref_t*, char*, int); + Extype_t (*reff)(Expr_t*, Exnode_t*, Exid_t*, Exref_t*); /* reference value function */ int (*setf)(Expr_t*, Exnode_t*, Exid_t*, Exref_t*, void*, int, Extype_t, Exdisc_t*); /* set value function */ diff --git a/lib/expr/extoken.c b/lib/expr/extoken.c index 8864b1e24..b736d5252 100644 --- a/lib/expr/extoken.c +++ b/lib/expr/extoken.c @@ -859,7 +859,7 @@ extoken_fn(Expr_t* ex) } break; } - (*ex->disc->reff)(ex, NULL, ex_lval.id, NULL, exstash(ex->tmp, NULL), 0); + (*ex->disc->reff)(ex, NULL, ex_lval.id, NULL); /*..INDENT*/ } diff --git a/lib/gvpr/compile.c b/lib/gvpr/compile.c index 303bc34d4..2f3fdca41 100644 --- a/lib/gvpr/compile.c +++ b/lib/gvpr/compile.c @@ -1808,11 +1808,8 @@ static tctype typeChkExp(Exref_t * ref, Exid_t * sym) * Type check expressions; return value unused. */ static Extype_t -refval(Expr_t * pgm, Exnode_t * node, Exid_t * sym, Exref_t * ref, - char *str, int elt) +refval(Expr_t * pgm, Exnode_t * node, Exid_t * sym, Exref_t * ref) { - (void)str; - (void)elt; Extype_t v; if (sym->lex == CONSTANT) { -- 2.40.0