From 0aa9d84b56e716fcba784d5007b02af839fd34df Mon Sep 17 00:00:00 2001 From: Rob Pike Date: Wed, 3 Nov 2010 12:20:37 -0700 Subject: [PATCH] units: fix compilation R=ken2, ken3 CC=golang-dev https://golang.org/cl/2865041 --- src/cmd/goyacc/units.y | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/cmd/goyacc/units.y b/src/cmd/goyacc/units.y index bd5517e8be..a7d472fc6c 100644 --- a/src/cmd/goyacc/units.y +++ b/src/cmd/goyacc/units.y @@ -215,7 +215,7 @@ expr0: type UnitsLex int -func (_ UnitsLex) Lex(yylval *yySymType) int { +func (UnitsLex) Lex(yylval *yySymType) int { var c, i int c = peekrune @@ -280,7 +280,7 @@ numb: return VAL } -func (_ UnitsLex) Error(s string) { +func (UnitsLex) Error(s string) { Error("syntax error, last name: %v", sym) } @@ -298,7 +298,7 @@ func main() { f, err := os.Open(file, os.O_RDONLY, 0) if err != nil { - fmt.Printf("error opening %v: %v\n", file, err) + fmt.Fprintf(os.Stderr, "error opening %v: %v\n", file, err) os.Exit(1) } fi = bufio.NewReader(f) @@ -390,7 +390,7 @@ func rdigit(c int) bool { func Error(s string, v ...interface{}) { fmt.Printf("%v: %v\n\t", lineno, line) - fmt.Printf(s, v) + fmt.Printf(s, v...) fmt.Printf("\n") nerrors++ -- 2.50.0