From 95bfd927f5d05fd2fb82dba918ff8d36bbc6d400 Mon Sep 17 00:00:00 2001 From: Josh Bleecher Snyder Date: Tue, 28 Mar 2017 11:17:52 -0700 Subject: [PATCH] cmd/compile: fix two instances of { lineno = ...; yyerror } Updates #19683 Change-Id: Ic00d5a9807200791cf37553f4f802dbf27beea19 Reviewed-on: https://go-review.googlesource.com/38770 Run-TryBot: Josh Bleecher Snyder TryBot-Result: Gobot Gobot Reviewed-by: Brad Fitzpatrick --- src/cmd/compile/internal/gc/walk.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/cmd/compile/internal/gc/walk.go b/src/cmd/compile/internal/gc/walk.go index 92ecaed8ec..e143116471 100644 --- a/src/cmd/compile/internal/gc/walk.go +++ b/src/cmd/compile/internal/gc/walk.go @@ -49,12 +49,10 @@ func walk(fn *Node) { if defn.Left.Used() { continue } - lineno = defn.Left.Pos - yyerror("%v declared and not used", ln.Sym) + yyerrorl(defn.Left.Pos, "%v declared and not used", ln.Sym) defn.Left.SetUsed(true) // suppress repeats } else { - lineno = ln.Pos - yyerror("%v declared and not used", ln.Sym) + yyerrorl(ln.Pos, "%v declared and not used", ln.Sym) } }