From ab09e33808c815cbc8f83b9d9ab110cc7b94bb0e Mon Sep 17 00:00:00 2001 From: Maxim Sharabayko Date: Wed, 6 Nov 2024 10:57:02 +0100 Subject: [PATCH] [core] Resolved GCC13 build warning regarding std::copy of a bool. --- srtcore/group.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/srtcore/group.cpp b/srtcore/group.cpp index 5601cdeee..c7c9ce0bd 100644 --- a/srtcore/group.cpp +++ b/srtcore/group.cpp @@ -448,10 +448,12 @@ template static void importOption(vector& storage, SRT_SOCKOPT optname, const ValueType& field) { ValueType default_opt = ValueType(); - int default_opt_size = sizeof(ValueType); + const int default_opt_size = sizeof(ValueType); ValueType opt = field; - if (!getOptDefault(optname, (&default_opt), (default_opt_size)) || default_opt != opt) + int opt_size = default_opt_size; + if (!getOptDefault(optname, (&default_opt), (opt_size)) || default_opt != opt) { + SRT_ASSERT(default_opt_size == default_opt_size); // Store the option when: // - no default for this option is found // - the option value retrieved from the field is different than default