From 399db4d2fccdad732e5702bc9dd8b26ea6db3f35 Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Fri, 23 Dec 2022 19:59:52 +0100 Subject: [PATCH] Silence spurious std::to_array() warning On GCC 12.2. --- src/common/serialization/vst3/base.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/common/serialization/vst3/base.cpp b/src/common/serialization/vst3/base.cpp index 18fc117b..38db32cc 100644 --- a/src/common/serialization/vst3/base.cpp +++ b/src/common/serialization/vst3/base.cpp @@ -66,10 +66,17 @@ const Steinberg::Vst::TChar* u16string_to_tchar_pointer( #endif } +// GCC 12.2's `std::to_array()` throws spurious array access out of bounds +// warnings +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Warray-bounds" + WineUID::WineUID() noexcept {} WineUID::WineUID(const Steinberg::TUID& tuid) noexcept : uid_(std::to_array(tuid)) {} +#pragma GCC diagnostic pop + ArrayUID WineUID::get_native_uid() const noexcept { // We need to shuffle the first 8 bytes around to convert between the // COM-compatible and non COM-compatible formats described by the