From: Josh Bleecher Snyder Date: Tue, 28 Mar 2017 18:17:52 +0000 (-0700) Subject: cmd/compile: fix two instances of { lineno = ...; yyerror } X-Git-Tag: go1.9beta1~949 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=95bfd927f5d05fd2fb82dba918ff8d36bbc6d400;p=gostls13.git 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 --- 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) } }