aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Pike <r@golang.org>2010-11-03 12:20:37 -0700
committerRob Pike <r@golang.org>2010-11-03 12:20:37 -0700
commit0aa9d84b56e716fcba784d5007b02af839fd34df (patch)
treeb368df51369ba2161f7c8efdb967508d24750be0
parent70d0b6b242a2c6c6983b7189df6e8140ed479661 (diff)
downloadgo-0aa9d84b56e716fcba784d5007b02af839fd34df.tar.gz
go-0aa9d84b56e716fcba784d5007b02af839fd34df.zip
units: fix compilation
R=ken2, ken3 CC=golang-dev https://golang.org/cl/2865041
-rw-r--r--src/cmd/goyacc/units.y8
1 files 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++