From 911ade8b734573a3282dbf4e66f9c6e7b6f91238 Mon Sep 17 00:00:00 2001 From: "Dirk-Jan C. Binnema" Date: Fri, 23 Jan 2026 21:24:18 +0200 Subject: [PATCH] sexp.hh: silence compiler warnings Seems they only happen in C++20 mode, not when compiling C++23 mode. So assuming these are false alarms (old code anyway) --- lib/utils/mu-sexp.hh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/utils/mu-sexp.hh b/lib/utils/mu-sexp.hh index d25cc647..77c8a8e2 100644 --- a/lib/utils/mu-sexp.hh +++ b/lib/utils/mu-sexp.hh @@ -109,10 +109,13 @@ struct Sexp { template Sexp(S&& s, T&& t, Args&&... args): value{List()} { +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wmaybe-uninitialized" auto& l{std::get(value)}; l.emplace_back(Sexp(std::forward(s))); l.emplace_back(Sexp(std::forward(t))); (l.emplace_back(Sexp(std::forward(args))), ...); +#pragma GCC diagnostic pop } /** @@ -205,9 +208,12 @@ struct Sexp { template Sexp& add(V1&& v1, V2&& v2, Args... args) { +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wmaybe-uninitialized" return add(std::forward(v1)) .add(std::forward(v2)) .add(std::forward(args)...); +#pragma GCC diagnostic pop } /// Adding list elements