]> Cypherpunks repositories - gostls13.git/commitdiff
cmd: fix three printf problems reported by newest vet
authorAlan Donovan <adonovan@google.com>
Wed, 15 Oct 2025 20:28:03 +0000 (16:28 -0400)
committerAlan Donovan <adonovan@google.com>
Wed, 15 Oct 2025 20:54:06 +0000 (13:54 -0700)
Change-Id: Id70985d217c940eb022dbc95bfaa20373672512c
Reviewed-on: https://go-review.googlesource.com/c/go/+/712220
Auto-Submit: Alan Donovan <adonovan@google.com>
TryBot-Bypass: Alan Donovan <adonovan@google.com>
Commit-Queue: Alan Donovan <adonovan@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
src/cmd/go/internal/modload/vendor.go
src/cmd/internal/obj/loong64/asm.go
src/cmd/internal/obj/riscv/obj.go

index bf0c4e403717a6e6600fbb4d778ea710d6b8109a..1fc20ad398b3636ec98c07b67f726c003007ec38 100644 (file)
@@ -188,7 +188,7 @@ func checkVendorConsistency(loaderstate *State, indexes []*modFileIndex, modFile
                                        // However, we can at least detect a version mismatch if packages were
                                        // vendored from a non-matching version.
                                        if vv, ok := vendorVersion[r.Mod.Path]; ok && vv != r.Mod.Version {
-                                               vendErrorf(r.Mod, fmt.Sprintf("is explicitly required in go.mod, but vendor/modules.txt indicates %s@%s", r.Mod.Path, vv))
+                                               vendErrorf(r.Mod, "is explicitly required in go.mod, but vendor/modules.txt indicates %s@%s", r.Mod.Path, vv)
                                        }
                                } else {
                                        vendErrorf(r.Mod, "is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt")
index ccf093ca9e8d548137dfe3fc16690b8394b8c2af..5a61acac8741d633804f160ea86705519de03078 100644 (file)
@@ -4438,7 +4438,7 @@ func (c *ctxt0) specialFpMovInst(a obj.As, fclass int, tclass int) uint32 {
                }
        }
 
-       c.ctxt.Diag("bad class combination: %s %d,%s\n", a, fclass, tclass)
+       c.ctxt.Diag("bad class combination: %s %d,%d\n", a, fclass, tclass)
 
        return 0
 }
index 4a9c54a3967c4e6a9c94627870915aacac75b578..74699cc398534e3a5688705aa5e5489e7b2094ba 100644 (file)
@@ -2991,7 +2991,7 @@ func (ins *instruction) length() int {
 func (ins *instruction) validate(ctxt *obj.Link) {
        enc, err := encodingForAs(ins.as)
        if err != nil {
-               ctxt.Diag(err.Error())
+               ctxt.Diag("%v", err)
                return
        }
        enc.validate(ctxt, ins)