diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2019-03-28 15:30:18 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2019-03-28 15:30:18 +0100 |
| commit | 4a9fce1952b2b4742bd07bc5137c75b0225d56ab (patch) | |
| tree | b4286fe6700b5c4e789e55a1921937acd8392a52 /pkg/compiler | |
| parent | 742f448304a916ae83bcdadf7e3be76c5464b37b (diff) | |
all: fix warnings pointed to by golangci-lint
Update #977
Diffstat (limited to 'pkg/compiler')
| -rw-r--r-- | pkg/compiler/consts.go | 3 |
1 files changed, 1 insertions, 2 deletions
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) { |
