tensor_device: silence -Wclass-memaccess for OffByOneScalar memset

libeigen/eigen!2508

Co-authored-by: Rasmus Munk Larsen <rmlarsen@gmail.com>
diff --git a/unsupported/test/tensor_device.cu b/unsupported/test/tensor_device.cu
index e7e6a05..c3c4943 100644
--- a/unsupported/test/tensor_device.cu
+++ b/unsupported/test/tensor_device.cu
@@ -196,7 +196,9 @@
   device.memset(device_data, byte_value, count * sizeof(DataType));
   device.memcpyDeviceToHost(host.data(), device_data, count * sizeof(DataType));
   synchronize(device);
-  memset(expected.data(), byte_value, count * sizeof(DataType));
+  // Cast to void* so the byte-level fill is not diagnosed as writing to a
+  // non-trivial type for scalars like OffByOneScalar.
+  memset(static_cast<void*>(expected.data()), byte_value, count * sizeof(DataType));
   for (Index i = 0; i < count; i++) {
     VERIFY_IS_EQUAL(host(i), expected(i));
   }