1
0
mirror of https://github.com/golang/go synced 2024-11-27 03:41:22 -07:00

misc/cgo/testshared: add format specifier in Errorf calls

Found by cmd/vet

Change-Id: I29dd207ecd40fe703054e8ad4e81b3267ca89da2
Reviewed-on: https://go-review.googlesource.com/17160
Reviewed-by: David Crawshaw <crawshaw@golang.org>
This commit is contained in:
Mohit Agarwal 2015-11-21 15:24:34 +05:30 committed by David Crawshaw
parent aad18b849b
commit 54bd5a71d3

View File

@ -285,23 +285,23 @@ func readNotes(f *elf.File) ([]*note, error) {
if err == io.EOF { if err == io.EOF {
break break
} }
return nil, fmt.Errorf("read namesize failed:", err) return nil, fmt.Errorf("read namesize failed: %v", err)
} }
err = binary.Read(r, f.ByteOrder, &descsize) err = binary.Read(r, f.ByteOrder, &descsize)
if err != nil { if err != nil {
return nil, fmt.Errorf("read descsize failed:", err) return nil, fmt.Errorf("read descsize failed: %v", err)
} }
err = binary.Read(r, f.ByteOrder, &tag) err = binary.Read(r, f.ByteOrder, &tag)
if err != nil { if err != nil {
return nil, fmt.Errorf("read type failed:", err) return nil, fmt.Errorf("read type failed: %v", err)
} }
name, err := readwithpad(r, namesize) name, err := readwithpad(r, namesize)
if err != nil { if err != nil {
return nil, fmt.Errorf("read name failed:", err) return nil, fmt.Errorf("read name failed: %v", err)
} }
desc, err := readwithpad(r, descsize) desc, err := readwithpad(r, descsize)
if err != nil { if err != nil {
return nil, fmt.Errorf("read desc failed:", err) return nil, fmt.Errorf("read desc failed: %v", err)
} }
notes = append(notes, &note{name: string(name), tag: tag, desc: string(desc), section: sect}) notes = append(notes, &note{name: string(name), tag: tag, desc: string(desc), section: sect})
} }