From 6e7fbc5c5c406c0f88ff566dafd4e916462edae8 Mon Sep 17 00:00:00 2001 From: Nekotekina Date: Mon, 17 Feb 2020 22:00:00 +0300 Subject: [PATCH] endian.hpp: fix zero array warning --- rpcs3/util/endian.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpcs3/util/endian.hpp b/rpcs3/util/endian.hpp index 9a95727ad1..a5460261f2 100644 --- a/rpcs3/util/endian.hpp +++ b/rpcs3/util/endian.hpp @@ -23,7 +23,7 @@ namespace stx struct type64 { - alignas(8) std::uint64_t data[sizeof(T) / 8]; + alignas(8) std::uint64_t data[sizeof(T) < 8 ? 1 : sizeof(T) / 8]; }; using type = std::conditional_t<(Align >= 8 && sizeof(T) % 8 == 0), type64, type8>;