cmd: fix three printf problems reported by newest vet

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>
This commit is contained in:
Alan Donovan 2025-10-15 16:28:03 -04:00
parent 0984dcd757
commit f1fed742eb
3 changed files with 3 additions and 3 deletions

View file

@ -188,7 +188,7 @@ func checkVendorConsistency(loaderstate *State, indexes []*modFileIndex, modFile
// However, we can at least detect a version mismatch if packages were // However, we can at least detect a version mismatch if packages were
// vendored from a non-matching version. // vendored from a non-matching version.
if vv, ok := vendorVersion[r.Mod.Path]; ok && vv != r.Mod.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 { } else {
vendErrorf(r.Mod, "is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt") vendErrorf(r.Mod, "is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt")

View 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 return 0
} }

View file

@ -2991,7 +2991,7 @@ func (ins *instruction) length() int {
func (ins *instruction) validate(ctxt *obj.Link) { func (ins *instruction) validate(ctxt *obj.Link) {
enc, err := encodingForAs(ins.as) enc, err := encodingForAs(ins.as)
if err != nil { if err != nil {
ctxt.Diag(err.Error()) ctxt.Diag("%v", err)
return return
} }
enc.validate(ctxt, ins) enc.validate(ctxt, ins)