diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2018-05-03 15:48:26 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2018-05-03 15:48:26 +0200 |
| commit | a630fd8b418650f8df52aead511ec4d27ca48ad2 (patch) | |
| tree | 0202f7587a306bab366f7d3720ef9b831933e3e0 /pkg/compiler/compiler.go | |
| parent | 9fe5658a1b7320b756d02cf2075dc5c735f86ff4 (diff) | |
gometalinter: some fixes for unparam
But we still can't enable it as there are more [uninteresting] warnings.
Update #538
Diffstat (limited to 'pkg/compiler/compiler.go')
| -rw-r--r-- | pkg/compiler/compiler.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pkg/compiler/compiler.go b/pkg/compiler/compiler.go index 809de5bd5..f49576561 100644 --- a/pkg/compiler/compiler.go +++ b/pkg/compiler/compiler.go @@ -176,7 +176,7 @@ func (comp *compiler) parseUnionAttrs(n *ast.Struct) (varlen bool, size uint64) } varlen = true case "size": - size = comp.parseSizeAttr(n, attr) + size = comp.parseSizeAttr(attr) default: comp.error(attr.Pos, "unknown union %v attribute %v", n.Name.Name, attr.Ident) @@ -215,7 +215,7 @@ func (comp *compiler) parseStructAttrs(n *ast.Struct) (packed bool, size, align } align = a case attr.Ident == "size": - size = comp.parseSizeAttr(n, attr) + size = comp.parseSizeAttr(attr) default: comp.error(attr.Pos, "unknown struct %v attribute %v", n.Name.Name, attr.Ident) @@ -224,7 +224,7 @@ func (comp *compiler) parseStructAttrs(n *ast.Struct) (packed bool, size, align return } -func (comp *compiler) parseSizeAttr(n *ast.Struct, attr *ast.Type) uint64 { +func (comp *compiler) parseSizeAttr(attr *ast.Type) uint64 { if len(attr.Args) != 1 { comp.error(attr.Pos, "%v attribute is expected to have 1 argument", attr.Ident) return sizeUnassigned |
