bsps/imxrt: Fix warning

The implementation of the BUILD_ASSURE in mcux-sdk causes a warning. Use
a C11 _Static_assert instead.

Updates #5300
This commit is contained in:
Christian Mauderer
2025-07-17 07:34:46 +02:00
committed by Kinsey Moore
parent 66f60eb050
commit c16bb34650

View File

@@ -21,7 +21,11 @@
#endif #endif
/*! Compile time sizeof() check */ /*! Compile time sizeof() check */
#ifndef __rtems__
#define BUILD_ASSURE(condition, msg) extern int msg[1 - 2 * (!(condition))] __attribute__((unused)) #define BUILD_ASSURE(condition, msg) extern int msg[1 - 2 * (!(condition))] __attribute__((unused))
#else /* __rtems__ */
#define BUILD_ASSURE(condition, msg) _Static_assert((condition), #msg)
#endif /* __rtems__ */
#define dcp_memcpy memcpy #define dcp_memcpy memcpy