diff options
author | Robert Falkenberg | 2022-05-19 08:49:19 +0200 |
---|---|---|
committer | Robert Falkenberg | 2022-05-19 08:49:19 +0200 |
commit | cd4e6d4b0d0512bb260015774ba4c5c678172a44 (patch) | |
tree | 8d33dc3f8674d9a1777ddbfb236aadf07d357e25 /0003-adt-fsm-ignore-GCC-warning-for-template-specializati.patch | |
parent | 1f306c136ab1739e0ff3b84e68815c6f2eadad6a (diff) | |
download | aur-cd4e6d4b0d0512bb260015774ba4c5c678172a44.tar.gz |
add patches to support build with GCC 12.1.0
Diffstat (limited to '0003-adt-fsm-ignore-GCC-warning-for-template-specializati.patch')
-rw-r--r-- | 0003-adt-fsm-ignore-GCC-warning-for-template-specializati.patch | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/0003-adt-fsm-ignore-GCC-warning-for-template-specializati.patch b/0003-adt-fsm-ignore-GCC-warning-for-template-specializati.patch new file mode 100644 index 000000000000..b09a59833ad7 --- /dev/null +++ b/0003-adt-fsm-ignore-GCC-warning-for-template-specializati.patch @@ -0,0 +1,53 @@ +From aa9f844630d0627018c7ecb7008e309e1d04905e Mon Sep 17 00:00:00 2001 +From: Robert Falkenberg <robert.falkenberg@srs.io> +Date: Fri, 13 May 2022 12:36:20 +0200 +Subject: [PATCH] adt,fsm: ignore GCC warning for template specialization w/wo + defaults for ReactFn or GuardFn + +--- + lib/include/srsran/adt/fsm.h | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/lib/include/srsran/adt/fsm.h b/lib/include/srsran/adt/fsm.h +index 1e00946d7..4583b1f19 100644 +--- a/lib/include/srsran/adt/fsm.h ++++ b/lib/include/srsran/adt/fsm.h +@@ -332,6 +332,9 @@ public: + constexpr static void (Derived::*react_fn)(SrcState&, const Event&) = ReactFn; + constexpr static bool (Derived::*guard_fn)(SrcState&, const Event&) = GuardFn; + ++ // ignore warning "never nullptr" for template specialization w/wo defaults for ReactFn or GuardFn ++ _Pragma("GCC diagnostic push"); // save current diagnostic config ++ _Pragma("GCC diagnostic ignored \"-Waddress\""); // ignore -Waddress + static bool react(derived_view* f, src_state_t& s, const event_t& ev) + { + if (guard_fn == nullptr or (f->*guard_fn)(s, ev)) { +@@ -342,6 +345,7 @@ public: + } + return false; + } ++ _Pragma("GCC diagnostic pop"); // restore diagnostic config + + template <typename SrcState2, typename Event2> + using is_match = std::is_same<type_list<SrcState2, Event2>, type_list<src_state_t, event_t> >; +@@ -363,6 +367,9 @@ public: + constexpr static void (Derived::*react_fn)(const Event&) = ReactFn; + constexpr static bool (Derived::*guard_fn)(const Event&) = GuardFn; + ++ // ignore warning "never nullptr" for template specialization w/wo defaults for ReactFn or GuardFn ++ _Pragma("GCC diagnostic push"); // save current diagnostic config ++ _Pragma("GCC diagnostic ignored \"-Waddress\""); // ignore -Waddress + template <typename SrcState> + static bool react(derived_view* f, SrcState& s, const event_t& ev) + { +@@ -374,6 +381,7 @@ public: + } + return false; + } ++ _Pragma("GCC diagnostic pop"); // restore diagnostic config + + template <typename SrcState2, typename Event2> + using is_match = std::is_same<Event2, event_t>; +-- +2.36.1 + |