From 4a9fce1952b2b4742bd07bc5137c75b0225d56ab Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Thu, 28 Mar 2019 15:30:18 +0100 Subject: all: fix warnings pointed to by golangci-lint Update #977 --- pkg/compiler/consts.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'pkg/compiler') diff --git a/pkg/compiler/consts.go b/pkg/compiler/consts.go index d3556c047..e06319fb6 100644 --- a/pkg/compiler/consts.go +++ b/pkg/compiler/consts.go @@ -164,10 +164,9 @@ func (comp *compiler) assignSyscallNumbers(consts map[string]uint64) { // Updates desc and returns set of unsupported syscalls and flags. func (comp *compiler) patchConsts(consts map[string]uint64) { for _, decl := range comp.desc.Nodes { - switch decl.(type) { + switch n := decl.(type) { case *ast.IntFlags: // Unsupported flag values are dropped. - n := decl.(*ast.IntFlags) var values []*ast.Int for _, v := range n.Values { if comp.patchIntConst(&v.Value, &v.Ident, consts, nil) { -- cgit mrf-deployment