From cabcd458ffd8f4bd33d06b1543845fe04649b1e5 Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Fri, 28 May 2021 13:20:48 +0200 Subject: [PATCH] Don't "misuse" unsafe.Pointer --- pkg/icingadb/objectpacker/objectpacker_test.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/icingadb/objectpacker/objectpacker_test.go b/pkg/icingadb/objectpacker/objectpacker_test.go index 6afb5882..26a1d7ff 100644 --- a/pkg/icingadb/objectpacker/objectpacker_test.go +++ b/pkg/icingadb/objectpacker/objectpacker_test.go @@ -5,7 +5,6 @@ import ( "github.com/icinga/icingadb/pkg/types" "io" "testing" - "unsafe" ) // limitedWriter allows writing a specific amount of data. @@ -150,7 +149,7 @@ func TestPackAny(t *testing.T) { assertPackAnyPanic(t, make(chan struct{}, 0), 0) assertPackAnyPanic(t, func() {}, 0) assertPackAnyPanic(t, struct{}{}, 0) - assertPackAnyPanic(t, unsafe.Pointer(uintptr(0)), 0) + assertPackAnyPanic(t, uintptr(0), 0) } func assertPackAny(t *testing.T, in interface{}, out []byte) {