aboutsummaryrefslogtreecommitdiff
path: root/src/cmd
diff options
context:
space:
mode:
authorAlan Donovan <adonovan@google.com>2024-05-23 10:47:36 -0400
committerAlan Donovan <adonovan@google.com>2024-05-23 18:42:28 +0000
commitbf91eb3a8bb057a620f3823e4d6b74a529c0a44d (patch)
tree4492b65fecf2d22336f43b63794296541d56209a /src/cmd
parentc34c124f4007e79978674ba519b9421665060186 (diff)
downloadgo-bf91eb3a8bb057a620f3823e4d6b74a529c0a44d.tar.xz
std: fix calls to Printf(s) with non-constant s
In all cases the intent was not to interpret s as a format string. In one case (go/types), this was a latent bug in production. (These were uncovered by a new check in vet's printf analyzer.) Updates #60529 Change-Id: I3e17af7e589be9aec1580783a1b1011c52ec494b Reviewed-on: https://go-review.googlesource.com/c/go/+/587855 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Russ Cox <rsc@golang.org>
Diffstat (limited to 'src/cmd')
-rw-r--r--src/cmd/compile/internal/types2/builtins.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/compile/internal/types2/builtins.go b/src/cmd/compile/internal/types2/builtins.go
index 8b08e498f3..d176cf0967 100644
--- a/src/cmd/compile/internal/types2/builtins.go
+++ b/src/cmd/compile/internal/types2/builtins.go
@@ -533,7 +533,7 @@ func (check *Checker) builtin(x *operand, call *syntax.CallExpr, id builtinId) (
case _Max, _Min:
// max(x, ...)
// min(x, ...)
- check.verifyVersionf(call.Fun, go1_21, quote(bin.name))
+ check.verifyVersionf(call.Fun, go1_21, "%s", quote(bin.name))
op := token.LSS
if id == _Max {