graphdriver: temporarily ignore unsafeptr: possible misuse of reflect.SliceHeader
Probably needs a similar change as c208f03fbd
,
but this code makes my head spin, so for now suppressing, and created a
tracking issue:
daemon/graphdriver/graphtest/graphtest_unix.go:305:12: unsafeptr: possible misuse of reflect.SliceHeader (govet)
header := *(*reflect.SliceHeader)(unsafe.Pointer(&buf))
^
daemon/graphdriver/graphtest/graphtest_unix.go:308:36: unsafeptr: possible misuse of reflect.SliceHeader (govet)
data := *(*[]byte)(unsafe.Pointer(&header))
^
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
d61b7c1211
commit
e6dabfa977
1 changed files with 2 additions and 2 deletions
|
@ -302,10 +302,10 @@ func writeRandomFile(path string, size uint64) error {
|
|||
}
|
||||
|
||||
// Cast to []byte
|
||||
header := *(*reflect.SliceHeader)(unsafe.Pointer(&buf))
|
||||
header := *(*reflect.SliceHeader)(unsafe.Pointer(&buf)) //nolint:govet // FIXME: unsafeptr: possible misuse of reflect.SliceHeader (govet) see https://github.com/moby/moby/issues/42444
|
||||
header.Len *= 8
|
||||
header.Cap *= 8
|
||||
data := *(*[]byte)(unsafe.Pointer(&header))
|
||||
data := *(*[]byte)(unsafe.Pointer(&header)) //nolint:govet // FIXME: unsafeptr: possible misuse of reflect.SliceHeader (govet) see https://github.com/moby/moby/issues/42444
|
||||
|
||||
return ioutil.WriteFile(path, data, 0700)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue