Skip to content

Commit 376e641

Browse files
valyalabradfitz
authored andcommitted
cmd: fixed certain vet warnings
Updates #11041 Change-Id: I7f2583d08f344d6622027c5e8a5de1f5d2f2881c Reviewed-on: https://go-review.googlesource.com/23082 Reviewed-by: Brad Fitzpatrick <[email protected]> Run-TryBot: Brad Fitzpatrick <[email protected]> TryBot-Result: Gobot Gobot <[email protected]>
1 parent a715849 commit 376e641

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

src/cmd/cover/cover.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ func trimComments(file *ast.File, fset *token.FileSet) []*ast.CommentGroup {
388388
}
389389
}
390390
if list != nil {
391-
comments = append(comments, &ast.CommentGroup{list})
391+
comments = append(comments, &ast.CommentGroup{List: list})
392392
}
393393
}
394394
return comments

src/cmd/dist/test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -699,7 +699,7 @@ func (t *tester) supportedBuildmode(mode string) bool {
699699
}
700700
return false
701701
default:
702-
log.Fatal("internal error: unknown buildmode %s", mode)
702+
log.Fatalf("internal error: unknown buildmode %s", mode)
703703
return false
704704
}
705705
}

src/cmd/internal/pprof/report/report.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,9 @@ func nodesPerSymbol(ns nodes, symbols []*objSymbol) map[*objSymbol]nodes {
205205
// offset to adjust the sample addresses.
206206
func annotateAssembly(insns []plugin.Inst, samples nodes, base uint64) nodes {
207207
// Add end marker to simplify printing loop.
208-
insns = append(insns, plugin.Inst{^uint64(0), "", "", 0})
208+
insns = append(insns, plugin.Inst{
209+
Addr: ^uint64(0),
210+
})
209211

210212
// Ensure samples are sorted by address.
211213
samples.sort(addressOrder)

src/cmd/link/internal/ld/objfile.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,7 @@ func (r *objReader) readSymName() string {
538538
origName = make([]byte, n)
539539
r.readFull(origName)
540540
} else if err != nil {
541-
log.Fatalf("%s: error reading symbol: %v", err)
541+
log.Fatalf("%s: error reading symbol: %v", r.pn, err)
542542
}
543543
adjName := r.rdBuf[:0]
544544
for {

0 commit comments

Comments
 (0)