From 6ea33f95df71ef71b6bfe9b462591e8eb806bc73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20S=C3=A1nchez?= Date: Mon, 12 Feb 2024 23:27:48 +0000 Subject: [PATCH] Eliminate warning about writing bytes directly to non-trivial type. --- test/packetmath.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/packetmath.cpp b/test/packetmath.cpp index bea00f284..b60e1eaa4 100644 --- a/test/packetmath.cpp +++ b/test/packetmath.cpp @@ -660,7 +660,7 @@ void packetmath() { uint8_t v = internal::random() ? (std::is_same::value ? static_cast(true) : 0xff) : 0; // Avoid strict aliasing violation by using memset. - memset(data1 + i, v, sizeof(Scalar)); + memset(static_cast(data1 + i), v, sizeof(Scalar)); // "then" packet data1[i + PacketSize] = internal::random(); // "else" packet