From a630fd8b418650f8df52aead511ec4d27ca48ad2 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Thu, 3 May 2018 15:48:26 +0200 Subject: gometalinter: some fixes for unparam But we still can't enable it as there are more [uninteresting] warnings. Update #538 --- pkg/compiler/compiler.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'pkg/compiler/compiler.go') 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 -- cgit mrf-deployment