Skip to content

Commit 3387655

Browse files
fabiobaltierinashif
authored andcommitted
tests: kernel: use {} to initialize test work_q structs
LLVM seems to be unhappy with the {0} initialization of structs with a deprecated element. Zero out the struct with just {}, seems to make it happier. Error was: start_stop.c:28:28: error: 'thread' is deprecated 28 | struct k_work_q work_q = {0}; Tested with: west build -p -b native_sim/native \ tests/kernel/workq/work_queue/ \ -DZEPHYR_TOOLCHAIN_VARIANT=host/llvm Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
1 parent 1c6a323 commit 3387655

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

tests/kernel/workq/work_queue/src/start_stop.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ ZTEST(workqueue_api, test_k_work_queue_start_stop)
2525
{
2626
size_t i;
2727
struct k_work work;
28-
struct k_work_q work_q = {0};
28+
struct k_work_q work_q = {};
2929
struct k_work works[NUM_TEST_ITEMS];
3030
struct k_work_queue_config cfg = {
3131
.name = "test_work_q",
@@ -58,7 +58,7 @@ ZTEST(workqueue_api, test_k_work_queue_start_stop)
5858

5959
ZTEST(workqueue_api, test_k_work_queue_stop_sys_thread)
6060
{
61-
struct k_work_q work_q = {0};
61+
struct k_work_q work_q = {};
6262
struct k_work_queue_config cfg = {
6363
.name = "test_work_q",
6464
.no_yield = true,
@@ -100,7 +100,7 @@ ZTEST(workqueue_api, test_k_work_queue_run_stop)
100100
size_t i;
101101
struct k_thread thread;
102102
struct k_work work;
103-
struct k_work_q work_q = {0};
103+
struct k_work_q work_q = {};
104104
struct k_work works[NUM_TEST_ITEMS];
105105
struct k_sem ret_sem;
106106

@@ -148,7 +148,7 @@ ZTEST(workqueue_api, test_k_work_queue_run_stop)
148148
*/
149149
ZTEST(workqueue_api, test_k_work_queue_priority)
150150
{
151-
struct k_work_q work_q = {0};
151+
struct k_work_q work_q = {};
152152
struct k_work_queue_config cfg = {
153153
.name = "prio_work_q",
154154
};

0 commit comments

Comments
 (0)