1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

core/lib: drop read only XFA's const volatile modifiers

This commit is contained in:
Kaspar Schleiser 2023-05-04 10:53:08 +02:00
parent ae51cbc560
commit ad9baab7f5

View File

@ -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