Skip to content

Commit

Permalink
cmd/compile: fix two instances of { lineno = ...; yyerror }
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
josharian committed Mar 28, 2017
1 parent b87fcc6 commit 95bfd92
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/cmd/compile/internal/gc/walk.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

Expand Down

0 comments on commit 95bfd92

Please sign in to comment.