Skip to content

Commit f1fed74

Browse files
committed
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>
1 parent 0984dcd commit f1fed74

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/cmd/go/internal/modload/vendor.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ func checkVendorConsistency(loaderstate *State, indexes []*modFileIndex, modFile
188188
// However, we can at least detect a version mismatch if packages were
189189
// vendored from a non-matching version.
190190
if vv, ok := vendorVersion[r.Mod.Path]; ok && vv != r.Mod.Version {
191-
vendErrorf(r.Mod, fmt.Sprintf("is explicitly required in go.mod, but vendor/modules.txt indicates %s@%s", r.Mod.Path, vv))
191+
vendErrorf(r.Mod, "is explicitly required in go.mod, but vendor/modules.txt indicates %s@%s", r.Mod.Path, vv)
192192
}
193193
} else {
194194
vendErrorf(r.Mod, "is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt")

src/cmd/internal/obj/loong64/asm.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4438,7 +4438,7 @@ func (c *ctxt0) specialFpMovInst(a obj.As, fclass int, tclass int) uint32 {
44384438
}
44394439
}
44404440

4441-
c.ctxt.Diag("bad class combination: %s %d,%s\n", a, fclass, tclass)
4441+
c.ctxt.Diag("bad class combination: %s %d,%d\n", a, fclass, tclass)
44424442

44434443
return 0
44444444
}

src/cmd/internal/obj/riscv/obj.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2991,7 +2991,7 @@ func (ins *instruction) length() int {
29912991
func (ins *instruction) validate(ctxt *obj.Link) {
29922992
enc, err := encodingForAs(ins.as)
29932993
if err != nil {
2994-
ctxt.Diag(err.Error())
2994+
ctxt.Diag("%v", err)
29952995
return
29962996
}
29972997
enc.validate(ctxt, ins)

0 commit comments

Comments
 (0)