From ad9baab7f5445d8254cca8a5360f3731f700be54 Mon Sep 17 00:00:00 2001 From: Kaspar Schleiser Date: Thu, 4 May 2023 10:53:08 +0200 Subject: [PATCH] core/lib: drop read only XFA's `const volatile` modifiers --- core/lib/include/xfa.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/core/lib/include/xfa.h b/core/lib/include/xfa.h index 1f37665639..89ed89cb9a 100644 --- a/core/lib/include/xfa.h +++ b/core/lib/include/xfa.h @@ -73,8 +73,8 @@ _Pragma("GCC diagnostic ignored \"-Warray-bounds\"") #define XFA_INIT_CONST(type, name) \ _Pragma("GCC diagnostic push") \ _Pragma("GCC diagnostic ignored \"-Wpedantic\"") \ - _XFA_CONST(name, 0_) const volatile type name [0] = {}; \ - _XFA_CONST(name, 9_) const volatile type name ## _end [0] = {}; \ + _XFA_CONST(name, 0_) type name [0] = {}; \ + _XFA_CONST(name, 9_) type name ## _end [0] = {}; \ _Pragma("GCC diagnostic pop") \ extern const unsigned __xfa_dummy @@ -112,8 +112,7 @@ _Pragma("GCC diagnostic ignored \"-Warray-bounds\"") * @param[in] name name of the cross-file array */ #define XFA_USE_CONST(type, name) \ - extern const type name []; \ - extern const type name ## _end [] + XFA_USE(type, name) /** * @brief Declare an external writable cross-file array @@ -176,7 +175,7 @@ _Pragma("GCC diagnostic ignored \"-Warray-bounds\"") */ #define XFA_ADD_PTR(xfa_name, prio, name, entry) \ _XFA_CONST(xfa_name, 5_ ## prio) \ - const __typeof__(entry) xfa_name ## _ ## prio ## _ ## name = entry + __typeof__(entry) xfa_name ## _ ## prio ## _ ## name = entry /** * @brief Calculate number of entries in cross-file array