From: Austin Clements Date: Tue, 27 Jun 2023 02:34:05 +0000 (-0400) Subject: runtime: remove runtime.Add testing function X-Git-Tag: go1.22rc1~1181 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=01cad815a1c3c48d54b3cbbfc9f599f5f91918fe;p=gostls13.git runtime: remove runtime.Add testing function Replace with unsafe.Add. Change-Id: Ic5c155349dadc51457119b3c05ab717cdfd26c95 Reviewed-on: https://go-review.googlesource.com/c/go/+/521176 Reviewed-by: Michael Knyszek Run-TryBot: Austin Clements Auto-Submit: Austin Clements TryBot-Result: Gopher Robot --- diff --git a/src/runtime/export_linux_test.go b/src/runtime/export_linux_test.go index 426fd1e109..52afd28666 100644 --- a/src/runtime/export_linux_test.go +++ b/src/runtime/export_linux_test.go @@ -11,7 +11,6 @@ const SigeventMaxSize = _sigev_max_size var NewOSProc0 = newosproc0 var Mincore = mincore -var Add = add type Siginfo siginfo type Sigevent sigevent diff --git a/src/runtime/runtime_linux_test.go b/src/runtime/runtime_linux_test.go index 6af5561e91..ab2452c9e7 100644 --- a/src/runtime/runtime_linux_test.go +++ b/src/runtime/runtime_linux_test.go @@ -45,7 +45,7 @@ func TestLockOSThread(t *testing.T) { // Use a misaligned pointer to get -EINVAL. func TestMincoreErrorSign(t *testing.T) { var dst byte - v := Mincore(Add(unsafe.Pointer(new(int32)), 1), 1, &dst) + v := Mincore(unsafe.Add(unsafe.Pointer(new(int32)), 1), 1, &dst) const EINVAL = 0x16 if v != -EINVAL {