graphdriver: temporarily ignore unsafeptr: possible misuse of reflect.SliceHeader
Probably needs a similar change asc208f03fbd
, 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> (cherry picked from commite6dabfa977
) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
f2f387b131
commit
ec3bfba89d
1 changed files with 2 additions and 2 deletions
|
@ -303,10 +303,10 @@ func writeRandomFile(path string, size uint64) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Cast to []byte
|
// 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.Len *= 8
|
||||||
header.Cap *= 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)
|
return ioutil.WriteFile(path, data, 0700)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue