Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

disable warnings on funcs which use go:linkname #66

Open
mvdan opened this issue Aug 31, 2022 · 0 comments
Open

disable warnings on funcs which use go:linkname #66

mvdan opened this issue Aug 31, 2022 · 0 comments

Comments

@mvdan
Copy link
Owner

mvdan commented Aug 31, 2022

//go:linkname reflect_typedmemclrpartial reflect.typedmemclrpartial
func reflect_typedmemclrpartial(typ *_type, ptr unsafe.Pointer, off, size uintptr) {
    if writeBarrier.needed && typ.ptrdata != 0 {
        bulkBarrierPreWrite(uintptr(ptr), 0, size)
    }
    memclrNoHeapPointers(ptr, size)
}

off here is an unused parameter, but it cannot be removed, as otherwise the go:linkname would break. I guess the user could rename the parameter to _, but that would be somewhat awkward.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant