[go] cmd: fix three printf problems reported by newest vet

0 views
Skip to first unread message

Alan Donovan (Gerrit)

unread,
4:29 PM (7 hours ago) 4:29 PM
to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

Alan Donovan has uploaded the change for review

Commit message

cmd: fix three printf problems reported by newest vet
Change-Id: Id70985d217c940eb022dbc95bfaa20373672512c

Change diff

diff --git a/src/cmd/go/internal/modload/vendor.go b/src/cmd/go/internal/modload/vendor.go
index bf0c4e4..1fc20ad 100644
--- a/src/cmd/go/internal/modload/vendor.go
+++ b/src/cmd/go/internal/modload/vendor.go
@@ -188,7 +188,7 @@
// 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")
diff --git a/src/cmd/internal/obj/loong64/asm.go b/src/cmd/internal/obj/loong64/asm.go
index ccf093c..5a61aca 100644
--- a/src/cmd/internal/obj/loong64/asm.go
+++ b/src/cmd/internal/obj/loong64/asm.go
@@ -4438,7 +4438,7 @@
}
}

- 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
}
diff --git a/src/cmd/internal/obj/riscv/obj.go b/src/cmd/internal/obj/riscv/obj.go
index 4a9c54a..74699cc 100644
--- a/src/cmd/internal/obj/riscv/obj.go
+++ b/src/cmd/internal/obj/riscv/obj.go
@@ -2991,7 +2991,7 @@
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)

Change information

Files:
  • M src/cmd/go/internal/modload/vendor.go
  • M src/cmd/internal/obj/loong64/asm.go
  • M src/cmd/internal/obj/riscv/obj.go
Change size: XS
Delta: 3 files changed, 3 insertions(+), 3 deletions(-)
Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement is not satisfiedCode-Review
  • requirement satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
  • requirement is not satisfiedTryBots-Pass
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: newchange
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: Id70985d217c940eb022dbc95bfaa20373672512c
Gerrit-Change-Number: 712220
Gerrit-PatchSet: 1
Gerrit-Owner: Alan Donovan <adon...@google.com>
Gerrit-Reviewer: Alan Donovan <adon...@google.com>
unsatisfied_requirement
satisfied_requirement
open
diffy

Alan Donovan (Gerrit)

unread,
4:29 PM (7 hours ago) 4:29 PM
to goph...@pubsubhelper.golang.org, Cherry Mui, Go LUCI, golang-co...@googlegroups.com
Attention needed from Cherry Mui

Alan Donovan voted Auto-Submit+1

Auto-Submit+1
Open in Gerrit

Related details

Attention is currently required from:
  • Cherry Mui
Submit Requirements:
  • requirement is not satisfiedCode-Review
  • requirement satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
  • requirement is not satisfiedTryBots-Pass
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: Id70985d217c940eb022dbc95bfaa20373672512c
Gerrit-Change-Number: 712220
Gerrit-PatchSet: 1
Gerrit-Owner: Alan Donovan <adon...@google.com>
Gerrit-Reviewer: Alan Donovan <adon...@google.com>
Gerrit-Reviewer: Cherry Mui <cher...@google.com>
Gerrit-Attention: Cherry Mui <cher...@google.com>
Gerrit-Comment-Date: Wed, 15 Oct 2025 20:29:29 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
unsatisfied_requirement
satisfied_requirement
open
diffy

Cherry Mui (Gerrit)

unread,
4:40 PM (7 hours ago) 4:40 PM
to Alan Donovan, goph...@pubsubhelper.golang.org, Go LUCI, golang-co...@googlegroups.com
Attention needed from Alan Donovan

Cherry Mui voted Code-Review+2

Code-Review+2
Open in Gerrit

Related details

Attention is currently required from:
  • Alan Donovan
Submit Requirements:
  • requirement satisfiedCode-Review
  • requirement satisfiedNo-Unresolved-Comments
  • requirement satisfiedReview-Enforcement
  • requirement is not satisfiedTryBots-Pass
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: Id70985d217c940eb022dbc95bfaa20373672512c
Gerrit-Change-Number: 712220
Gerrit-PatchSet: 1
Gerrit-Owner: Alan Donovan <adon...@google.com>
Gerrit-Reviewer: Alan Donovan <adon...@google.com>
Gerrit-Reviewer: Cherry Mui <cher...@google.com>
Gerrit-Attention: Alan Donovan <adon...@google.com>
Gerrit-Comment-Date: Wed, 15 Oct 2025 20:40:33 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Alan Donovan (Gerrit)

unread,
4:54 PM (7 hours ago) 4:54 PM
to goph...@pubsubhelper.golang.org, Cherry Mui, Go LUCI, golang-co...@googlegroups.com

Alan Donovan voted and added 1 comment

Votes added by Alan Donovan

Commit-Queue+1
TryBot-Bypass+1

1 comment

Patchset-level comments
File-level comment, Patchset 1 (Latest):
Alan Donovan . resolved

The StandaloneFiles test failure is spurious; see CL 712182.

Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
    • requirement satisfiedCode-Review
    • requirement satisfiedNo-Unresolved-Comments
    • requirement satisfiedReview-Enforcement
    • requirement satisfiedTryBots-Pass
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: go
    Gerrit-Branch: master
    Gerrit-Change-Id: Id70985d217c940eb022dbc95bfaa20373672512c
    Gerrit-Change-Number: 712220
    Gerrit-PatchSet: 1
    Gerrit-Owner: Alan Donovan <adon...@google.com>
    Gerrit-Reviewer: Alan Donovan <adon...@google.com>
    Gerrit-Reviewer: Cherry Mui <cher...@google.com>
    Gerrit-Comment-Date: Wed, 15 Oct 2025 20:54:02 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    open
    diffy

    Alan Donovan (Gerrit)

    unread,
    4:54 PM (7 hours ago) 4:54 PM
    to goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Cherry Mui, Go LUCI, golang-co...@googlegroups.com

    Alan Donovan submitted the change

    Change information

    Commit message:
    cmd: fix three printf problems reported by newest vet
    Change-Id: Id70985d217c940eb022dbc95bfaa20373672512c
    Auto-Submit: Alan Donovan <adon...@google.com>
    TryBot-Bypass: Alan Donovan <adon...@google.com>
    Commit-Queue: Alan Donovan <adon...@google.com>
    Reviewed-by: Cherry Mui <cher...@google.com>
    Files:
    • M src/cmd/go/internal/modload/vendor.go
    • M src/cmd/internal/obj/loong64/asm.go
    • M src/cmd/internal/obj/riscv/obj.go
    Change size: XS
    Delta: 3 files changed, 3 insertions(+), 3 deletions(-)
    Branch: refs/heads/master
    Submit Requirements:
    • requirement satisfiedCode-Review: +2 by Cherry Mui
    • requirement satisfiedTryBots-Pass: LUCI-TryBot-Result-1 by Go LUCI, TryBot-Bypass+1 by Alan Donovan
    Open in Gerrit
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: merged
    Gerrit-Project: go
    Gerrit-Branch: master
    Gerrit-Change-Id: Id70985d217c940eb022dbc95bfaa20373672512c
    Gerrit-Change-Number: 712220
    Gerrit-PatchSet: 2
    open
    diffy
    satisfied_requirement
    Reply all
    Reply to author
    Forward
    0 new messages