Skip to content

Commit d94409d

Browse files
committed
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 <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Robert Griesemer <[email protected]>
1 parent e0d8064 commit d94409d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/go/types/builtins.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ func (check *Checker) builtin(x *operand, call *ast.CallExpr, id builtinId) (_ b
434434
return
435435
}
436436
if nargs < min || min+1 < nargs {
437-
check.errorf(call.Pos(), "%s expects %d or %d arguments; found %d", call, min, min+1, nargs)
437+
check.errorf(call.Pos(), "%v expects %d or %d arguments; found %d", call, min, min+1, nargs)
438438
return
439439
}
440440
var sizes []int64 // constant integer arguments, if any
@@ -595,7 +595,7 @@ func (check *Checker) builtin(x *operand, call *ast.CallExpr, id builtinId) (_ b
595595
return
596596
}
597597
if !constant.BoolVal(x.val) {
598-
check.errorf(call.Pos(), "%s failed", call)
598+
check.errorf(call.Pos(), "%v failed", call)
599599
// compile-time assertion failure - safe to continue
600600
}
601601
// result is constant - no need to record signature

0 commit comments

Comments
 (0)