forked from Imagelibrary/rtems
spmisc01/init.c: Eliminate use of keyword unreachable
In C23 and later, unreachable is a keyword. GCC 15 defaults to C23. Closes #5261.
This commit is contained in:
committed by
Gedare Bloom
parent
8915b72068
commit
1873615777
@@ -104,7 +104,7 @@ typedef struct {
|
|||||||
uint8_t aligned_member RTEMS_ALIGNED(64);
|
uint8_t aligned_member RTEMS_ALIGNED(64);
|
||||||
} aligned_member_struct;
|
} aligned_member_struct;
|
||||||
|
|
||||||
static void unreachable(void)
|
static void test_unreachable(void)
|
||||||
{
|
{
|
||||||
if (0) {
|
if (0) {
|
||||||
RTEMS_UNREACHABLE();
|
RTEMS_UNREACHABLE();
|
||||||
@@ -245,7 +245,7 @@ static void Init(rtems_task_argument arg)
|
|||||||
rtems_test_assert(weak_2() == 111);
|
rtems_test_assert(weak_2() == 111);
|
||||||
rtems_test_assert(((uintptr_t) &aligned_variable) % 64 == 0);
|
rtems_test_assert(((uintptr_t) &aligned_variable) % 64 == 0);
|
||||||
rtems_test_assert(offsetof(aligned_member_struct, aligned_member) % 64 == 0);
|
rtems_test_assert(offsetof(aligned_member_struct, aligned_member) % 64 == 0);
|
||||||
unreachable();
|
test_unreachable();
|
||||||
rtems_test_assert(printflike_func("%i", 0) == 56);
|
rtems_test_assert(printflike_func("%i", 0) == 56);
|
||||||
rtems_test_assert(obfuscate_variable(63) == 63);
|
rtems_test_assert(obfuscate_variable(63) == 63);
|
||||||
rtems_test_assert(
|
rtems_test_assert(
|
||||||
|
|||||||
Reference in New Issue
Block a user