testsuites/*: Address missing field initializer warnings (extensions)

Address missing field initializer warnings.

These were rtems_extensions_table declarations with initialization.
The initialization was changed to using named fields.

Updates #5325.
This commit is contained in:
Joel Sherrill
2025-10-14 14:05:23 -05:00
parent edba3942cc
commit 1d08df678b
7 changed files with 74 additions and 57 deletions

View File

@@ -44,14 +44,15 @@
const char rtems_test_name[] = "CPUUSE";
rtems_extensions_table Extensions = {
NULL, /* task create user extension */
NULL, /* task start user extension */
NULL, /* task restart user extension */
NULL, /* task delete user extension */
Task_switch, /* task switch user extension */
NULL, /* task begin user extension */
NULL, /* task exitted user extension */
NULL /* fatal error user extension */
.thread_create = NULL, /* task create user extension */
.thread_start = NULL, /* task start user extension */
.thread_restart = NULL, /* task restart user extension */
.thread_delete = NULL, /* task delete user extension */
.thread_switch = Task_switch, /* task switch user extension */
.thread_begin = NULL, /* task begin user extension */
.thread_exitted = NULL, /* task exitted user extension */
.fatal = NULL, /* fatal error user extension */
.thread_terminate = NULL /* fatal error user extension */
};
rtems_task Init(

View File

@@ -67,7 +67,17 @@ void Fatal_extension(
);
#define CONFIGURE_INITIAL_EXTENSIONS \
{ NULL, NULL, NULL, NULL, NULL, NULL, NULL, Fatal_extension }, \
{ \
.thread_create = NULL, \
.thread_start = NULL, \
.thread_restart = NULL, \
.thread_delete = NULL, \
.thread_switch = NULL, \
.thread_begin = NULL, \
.thread_exitted = NULL, \
.fatal = Fatal_extension, \
.thread_terminate = NULL \
}, \
RTEMS_TEST_INITIAL_EXTENSION
#include <rtems/confdefs.h>

View File

@@ -114,14 +114,15 @@ static void Fatal_extension(
#define CONFIGURE_INITIAL_EXTENSIONS \
{ \
NULL, /* create */ \
NULL, /* start */ \
NULL, /* restart */ \
NULL, /* delete */ \
NULL, /* switch */ \
NULL, /* begin */ \
NULL, /* exitted */ \
Fatal_extension /* fatal */ \
.thread_create = NULL, \
.thread_start = NULL, \
.thread_restart = NULL, \
.thread_delete = NULL, \
.thread_switch = NULL, \
.thread_begin = NULL, \
.thread_exitted = NULL, \
.fatal = Fatal_extension, \
.thread_terminate = NULL \
}, \
RTEMS_TEST_INITIAL_EXTENSION

View File

@@ -48,14 +48,15 @@
const char rtems_test_name[] = "SP 4";
rtems_extensions_table Extensions = {
NULL, /* task create user extension */
NULL, /* task start user extension */
NULL, /* task restart user extension */
NULL, /* task delete user extension */
Task_switch, /* task switch user extension */
NULL, /* task begin user extension */
NULL, /* task exitted user extension */
NULL /* fatal error user extension */
.thread_create = NULL,
.thread_start = NULL,
.thread_restart = NULL,
.thread_delete = NULL,
.thread_switch = Task_switch,
.thread_begin = NULL,
.thread_exitted = NULL,
.fatal = NULL,
.thread_terminate = NULL
};
rtems_task Init(

View File

@@ -67,25 +67,27 @@ static bool Task_harmless_extension_true_two(
}
static const rtems_extensions_table Harmless_extensions = {
Task_harmless_extension_true_two,
Task_harmless_extension_two,
Task_harmless_extension_two,
Task_harmless_extension_two,
Task_harmless_extension_two,
Task_harmless_extension_one,
Task_harmless_extension_one,
NULL
.thread_create = Task_harmless_extension_true_two,
.thread_start = Task_harmless_extension_two,
.thread_restart = Task_harmless_extension_two,
.thread_delete = Task_harmless_extension_two,
.thread_switch = Task_harmless_extension_two,
.thread_begin = Task_harmless_extension_one,
.thread_exitted = Task_harmless_extension_one,
.fatal = NULL,
.thread_terminate = NULL
};
rtems_extensions_table Extensions = {
Task_create_extension, /* task create user extension */
Task_start_extension, /* task start user extension */
Task_restart_extension, /* task restart user extension */
Task_delete_extension, /* task delete user extension */
NULL, /* task switch user extension */
NULL, /* begin user extension */
Task_exit_extension, /* task exitted user extension */
NULL /* fatal error extension */
.thread_create = Task_create_extension,
.thread_start = Task_start_extension,
.thread_restart = Task_restart_extension,
.thread_delete = Task_delete_extension,
.thread_switch = NULL,
.thread_begin = NULL,
.thread_exitted = Task_exit_extension,
.fatal = NULL,
.thread_terminate = NULL
};
rtems_task Init(

View File

@@ -56,14 +56,15 @@ bool task_create(
}
rtems_extensions_table Extensions = {
task_create, /* task create user extension */
NULL, /* task start user extension */
NULL, /* task restart user extension */
NULL, /* task delete user extension */
NULL, /* task switch user extension */
NULL, /* task begin user extension */
NULL, /* task exitted user extension */
NULL /* fatal error user extension */
.thread_create = task_create,
.thread_start = NULL,
.thread_restart = NULL,
.thread_delete = NULL,
.thread_switch = NULL,
.thread_begin = NULL,
.thread_exitted = NULL,
.fatal = NULL,
.thread_terminate = NULL
};
rtems_task Init(

View File

@@ -130,14 +130,15 @@ static void Fatal_extension(
#define CONFIGURE_INITIAL_EXTENSIONS \
{ \
NULL, /* create */ \
NULL, /* start */ \
NULL, /* restart */ \
NULL, /* delete */ \
NULL, /* switch */ \
NULL, /* begin */ \
NULL, /* exitted */ \
Fatal_extension /* fatal */ \
.thread_create = NULL, \
.thread_start = NULL, \
.thread_restart = NULL, \
.thread_delete = NULL, \
.thread_switch = NULL, \
.thread_begin = NULL, \
.thread_exitted = NULL, \
.fatal = Fatal_extension, \
.thread_terminate = NULL \
}, \
RTEMS_TEST_INITIAL_EXTENSION