Commit 376e6415 authored by Aliaksandr Valialkin's avatar Aliaksandr Valialkin Committed by Brad Fitzpatrick

cmd: fixed certain vet warnings

Updates #11041

Change-Id: I7f2583d08f344d6622027c5e8a5de1f5d2f2881c
Reviewed-on: https://go-review.googlesource.com/23082Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent a7158497
......@@ -388,7 +388,7 @@ func trimComments(file *ast.File, fset *token.FileSet) []*ast.CommentGroup {
}
}
if list != nil {
comments = append(comments, &ast.CommentGroup{list})
comments = append(comments, &ast.CommentGroup{List: list})
}
}
return comments
......
......@@ -699,7 +699,7 @@ func (t *tester) supportedBuildmode(mode string) bool {
}
return false
default:
log.Fatal("internal error: unknown buildmode %s", mode)
log.Fatalf("internal error: unknown buildmode %s", mode)
return false
}
}
......
......@@ -205,7 +205,9 @@ func nodesPerSymbol(ns nodes, symbols []*objSymbol) map[*objSymbol]nodes {
// offset to adjust the sample addresses.
func annotateAssembly(insns []plugin.Inst, samples nodes, base uint64) nodes {
// Add end marker to simplify printing loop.
insns = append(insns, plugin.Inst{^uint64(0), "", "", 0})
insns = append(insns, plugin.Inst{
Addr: ^uint64(0),
})
// Ensure samples are sorted by address.
samples.sort(addressOrder)
......
......@@ -538,7 +538,7 @@ func (r *objReader) readSymName() string {
origName = make([]byte, n)
r.readFull(origName)
} else if err != nil {
log.Fatalf("%s: error reading symbol: %v", err)
log.Fatalf("%s: error reading symbol: %v", r.pn, err)
}
adjName := r.rdBuf[:0]
for {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment