From d2d7e6d3679cea0eb59290d627d41a449d382b2a Mon Sep 17 00:00:00 2001 From: Masaaki Goshima Date: Thu, 18 Mar 2021 18:31:45 +0900 Subject: [PATCH] Fix error by linter --- internal/encoder/vm/util.go | 2 +- internal/encoder/vm_escaped/util.go | 2 +- internal/encoder/vm_escaped_indent/util.go | 2 +- internal/encoder/vm_indent/util.go | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/encoder/vm/util.go b/internal/encoder/vm/util.go index d9c5449..e3ab131 100644 --- a/internal/encoder/vm/util.go +++ b/internal/encoder/vm/util.go @@ -18,7 +18,7 @@ func store(base uintptr, idx uintptr, p uintptr) { **(**uintptr)(unsafe.Pointer(&addr)) = p } -func loadNPtr(base uintptr, idx uintptr, ptrNum int) uintptr { +func loadNPtr(base uintptr, idx uintptr, _ int) uintptr { addr := base + idx p := **(**uintptr)(unsafe.Pointer(&addr)) if p == 0 { diff --git a/internal/encoder/vm_escaped/util.go b/internal/encoder/vm_escaped/util.go index 437154e..2bf9be9 100644 --- a/internal/encoder/vm_escaped/util.go +++ b/internal/encoder/vm_escaped/util.go @@ -18,7 +18,7 @@ func store(base uintptr, idx uintptr, p uintptr) { **(**uintptr)(unsafe.Pointer(&addr)) = p } -func loadNPtr(base uintptr, idx uintptr, ptrNum int) uintptr { +func loadNPtr(base uintptr, idx uintptr, _ int) uintptr { addr := base + idx p := **(**uintptr)(unsafe.Pointer(&addr)) if p == 0 { diff --git a/internal/encoder/vm_escaped_indent/util.go b/internal/encoder/vm_escaped_indent/util.go index ba004cd..fc26d4d 100644 --- a/internal/encoder/vm_escaped_indent/util.go +++ b/internal/encoder/vm_escaped_indent/util.go @@ -19,7 +19,7 @@ func store(base uintptr, idx uintptr, p uintptr) { **(**uintptr)(unsafe.Pointer(&addr)) = p } -func loadNPtr(base uintptr, idx uintptr, ptrNum int) uintptr { +func loadNPtr(base uintptr, idx uintptr, _ int) uintptr { addr := base + idx p := **(**uintptr)(unsafe.Pointer(&addr)) if p == 0 { diff --git a/internal/encoder/vm_indent/util.go b/internal/encoder/vm_indent/util.go index dcf976e..9c68aae 100644 --- a/internal/encoder/vm_indent/util.go +++ b/internal/encoder/vm_indent/util.go @@ -19,7 +19,7 @@ func store(base uintptr, idx uintptr, p uintptr) { **(**uintptr)(unsafe.Pointer(&addr)) = p } -func loadNPtr(base uintptr, idx uintptr, ptrNum int) uintptr { +func loadNPtr(base uintptr, idx uintptr, _ int) uintptr { addr := base + idx p := **(**uintptr)(unsafe.Pointer(&addr)) if p == 0 {