From: Josh Bleecher Snyder Date: Fri, 8 Jul 2016 00:20:00 +0000 (-0700) Subject: go/types: fix bad printf verbs X-Git-Tag: go1.8beta1~1881 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=d94409d65186a5fcee2955e374e1d5c0f457eb2b;p=gostls13.git go/types: fix bad printf verbs This fixes the following vet warnings: go/types/builtins.go:437: arg call for printf verb %s of wrong type: *go/ast.CallExpr go/types/builtins.go:598: arg call for printf verb %s of wrong type: *go/ast.CallExpr Updates #11041 Change-Id: I746d054e8e49b330fbdf961912a98f55dd5f3ff9 Reviewed-on: https://go-review.googlesource.com/26997 Run-TryBot: Josh Bleecher Snyder TryBot-Result: Gobot Gobot Reviewed-by: Robert Griesemer --- diff --git a/src/go/types/builtins.go b/src/go/types/builtins.go index 0082be9e2e..fc4db4513b 100644 --- a/src/go/types/builtins.go +++ b/src/go/types/builtins.go @@ -434,7 +434,7 @@ func (check *Checker) builtin(x *operand, call *ast.CallExpr, id builtinId) (_ b return } if nargs < min || min+1 < nargs { - check.errorf(call.Pos(), "%s expects %d or %d arguments; found %d", call, min, min+1, nargs) + check.errorf(call.Pos(), "%v expects %d or %d arguments; found %d", call, min, min+1, nargs) return } var sizes []int64 // constant integer arguments, if any @@ -595,7 +595,7 @@ func (check *Checker) builtin(x *operand, call *ast.CallExpr, id builtinId) (_ b return } if !constant.BoolVal(x.val) { - check.errorf(call.Pos(), "%s failed", call) + check.errorf(call.Pos(), "%v failed", call) // compile-time assertion failure - safe to continue } // result is constant - no need to record signature