go-gl/gl

unsafe usage of reflect.SliceHeader

Opened this issue · 0 comments

https://github.com/go-gl/gl/blob/master/v2.1/gl/conversions.go#L94-L106

Go1.16's go vet warns this reflect.SliceHeader usage. See also https://golang.org/pkg/unsafe/

In general, reflect.SliceHeader and reflect.StringHeader should be used only as *reflect.SliceHeader and *reflect.StringHeader pointing at actual slices or strings, never as plain structs. A program should not declare or allocate variables of these struct types.