aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/loopvar
diff options
context:
space:
mode:
authorAlan Donovan <adonovan@google.com>2024-09-04 13:14:17 -0400
committerAlan Donovan <adonovan@google.com>2024-09-04 18:16:59 +0000
commitcd9a300afc0be43f7ad1891a18ed9b690f7f97ab (patch)
treec75ebe4996e022d37078729224083101193d2e69 /src/cmd/compile/internal/loopvar
parent21ac23a96f204dfb558a8d3071380c1d105a93ba (diff)
downloadgo-cd9a300afc0be43f7ad1891a18ed9b690f7f97ab.tar.xz
all: fix printf(var) mistakes detected by latest printf checker
These will cause build failures once we vendor x/tools. In once case I renamed a function err to errf to indicate that it is printf-like. Updates golang/go#68796 Change-Id: I04d57b34ee5362f530554b7e8b817f70a9088d12 Reviewed-on: https://go-review.googlesource.com/c/go/+/610739 Commit-Queue: Alan Donovan <adonovan@google.com> Reviewed-by: Robert Findley <rfindley@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Tim King <taking@google.com> Auto-Submit: Alan Donovan <adonovan@google.com>
Diffstat (limited to 'src/cmd/compile/internal/loopvar')
-rw-r--r--src/cmd/compile/internal/loopvar/loopvar_test.go18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/cmd/compile/internal/loopvar/loopvar_test.go b/src/cmd/compile/internal/loopvar/loopvar_test.go
index 64cfdb77d9..b19962f0fd 100644
--- a/src/cmd/compile/internal/loopvar/loopvar_test.go
+++ b/src/cmd/compile/internal/loopvar/loopvar_test.go
@@ -141,10 +141,10 @@ func TestLoopVarInlinesGo1_21(t *testing.T) {
c := f(root + "/c")
m := f(root)
- t.Logf(a)
- t.Logf(b)
- t.Logf(c)
- t.Logf(m)
+ t.Log(a)
+ t.Log(b)
+ t.Log(c)
+ t.Log(m)
if !strings.Contains(a, "f, af, bf, abf, cf sums = 100, 45, 100, 100, 100") {
t.Errorf("Did not see expected value of a")
@@ -200,7 +200,7 @@ func TestLoopVarHashes(t *testing.T) {
for _, arg := range []string{"v001100110110110010100100", "vx336ca4"} {
m := f(arg)
- t.Logf(m)
+ t.Log(m)
mCount := countMatches(m, "loopvarhash triggered cmd/compile/internal/loopvar/testdata/inlines/main.go:27:6: .* 001100110110110010100100")
otherCount := strings.Count(m, "loopvarhash")
@@ -249,7 +249,7 @@ func TestLoopVarVersionEnableFlag(t *testing.T) {
b, err := cmd.CombinedOutput()
m := string(b)
- t.Logf(m)
+ t.Log(m)
yCount := strings.Count(m, "opt.go:16:6: loop variable private now per-iteration, heap-allocated (loop inlined into ./opt.go:29)")
nCount := strings.Count(m, "shared")
@@ -288,7 +288,7 @@ func TestLoopVarVersionEnableGoBuild(t *testing.T) {
b, err := cmd.CombinedOutput()
m := string(b)
- t.Logf(m)
+ t.Log(m)
yCount := strings.Count(m, "opt-122.go:18:6: loop variable private now per-iteration, heap-allocated (loop inlined into ./opt-122.go:31)")
nCount := strings.Count(m, "shared")
@@ -327,7 +327,7 @@ func TestLoopVarVersionDisableFlag(t *testing.T) {
b, err := cmd.CombinedOutput()
m := string(b)
- t.Logf(m) // expect error
+ t.Log(m) // expect error
yCount := strings.Count(m, "opt.go:16:6: loop variable private now per-iteration, heap-allocated (loop inlined into ./opt.go:29)")
nCount := strings.Count(m, "shared")
@@ -366,7 +366,7 @@ func TestLoopVarVersionDisableGoBuild(t *testing.T) {
b, err := cmd.CombinedOutput()
m := string(b)
- t.Logf(m) // expect error
+ t.Log(m) // expect error
yCount := strings.Count(m, "opt-121.go:18:6: loop variable private now per-iteration, heap-allocated (loop inlined into ./opt-121.go:31)")
nCount := strings.Count(m, "shared")