]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile: fix two instances of { lineno = ...; yyerror }
authorJosh Bleecher Snyder <josharian@gmail.com>
Tue, 28 Mar 2017 18:17:52 +0000 (11:17 -0700)
committerJosh Bleecher Snyder <josharian@gmail.com>
Tue, 28 Mar 2017 18:51:25 +0000 (18:51 +0000)
Updates #19683

Change-Id: Ic00d5a9807200791cf37553f4f802dbf27beea19
Reviewed-on: https://go-review.googlesource.com/38770
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/cmd/compile/internal/gc/walk.go

index 92ecaed8ecf28cdcfc3cc8d32ed6639361b6799a..e14311647179490d7e2626aa529f6a29d4296609 100644 (file)
@@ -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)
                }
        }