summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDirk-Jan C. Binnema <djcb@djcbsoftware.nl>2026-01-23 21:24:18 +0200
committerDirk-Jan C. Binnema <djcb@djcbsoftware.nl>2026-01-23 21:24:18 +0200
commite6f08ae266f7c075b2047bea2d7c7ea2a108bfa2 (patch)
tree5b23eb15788191491eb1b6d20f414aa8c81dda58 /lib
parent5c0090e66b533b9308c296c486fea6be5c8031bd (diff)
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)
Diffstat (limited to 'lib')
-rw-r--r--lib/utils/mu-sexp.hh6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/utils/mu-sexp.hh b/lib/utils/mu-sexp.hh
index d25cc64..77c8a8e 100644
--- a/lib/utils/mu-sexp.hh
+++ b/lib/utils/mu-sexp.hh
@@ -109,10 +109,13 @@ struct Sexp {
template<typename S, typename T, typename... Args>
Sexp(S&& s, T&& t, Args&&... args): value{List()} {
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
auto& l{std::get<List>(value)};
l.emplace_back(Sexp(std::forward<S>(s)));
l.emplace_back(Sexp(std::forward<T>(t)));
(l.emplace_back(Sexp(std::forward<Args>(args))), ...);
+#pragma GCC diagnostic pop
}
/**
@@ -205,9 +208,12 @@ struct Sexp {
template <typename V1, typename V2, typename... Args>
Sexp& add(V1&& v1, V2&& v2, Args... args) {
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
return add(std::forward<V1>(v1))
.add(std::forward<V2>(v2))
.add(std::forward<Args>(args)...);
+#pragma GCC diagnostic pop
}
/// Adding list elements