]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/cgo: add missing formatting directive in error message
authorIan Lance Taylor <iant@golang.org>
Thu, 14 Apr 2016 23:51:18 +0000 (16:51 -0700)
committerIan Lance Taylor <iant@golang.org>
Fri, 15 Apr 2016 22:03:22 +0000 (22:03 +0000)
Fixes #15310.

Change-Id: I588b3c630a20a6878f7cd00f9af29b1dd8a4abf6
Reviewed-on: https://go-review.googlesource.com/22100
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/cmd/cgo/gcc.go

index 84cd2e816a1644ef5e571b4b024087e14dcc517c..3ee4461352c30d45be03044e245b4c9f22b2912e 100644 (file)
@@ -1009,7 +1009,7 @@ func (p *Package) rewriteRef(f *File) {
                        if r.Name.Kind == "var" {
                                expr = &ast.StarExpr{Star: (*r.Expr).Pos(), X: expr}
                        } else {
-                               error_(r.Pos(), "only C variables allowed in selector expression", fixGo(r.Name.Go))
+                               error_(r.Pos(), "only C variables allowed in selector expression %s", fixGo(r.Name.Go))
                        }
 
                case "type":