From d6997488f86bdc265d5f15f7f3c9d1d37183fe63 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Tue, 13 Apr 2021 13:16:31 +0200 Subject: SQUASH libtest: Fix use of flexible array member --- testsuites/libtests/ttest02/init.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/testsuites/libtests/ttest02/init.c b/testsuites/libtests/ttest02/init.c index 01b9e8dd68..a5bdea4c25 100644 --- a/testsuites/libtests/ttest02/init.c +++ b/testsuites/libtests/ttest02/init.c @@ -289,23 +289,23 @@ T_TEST_CASE(TestThreadSwitch) memset(&log_2, 0xff, sizeof(log_2)); log = T_thread_switch_record_2(&log_2); T_null(log); - T_eq_sz(log_2.log.recorded, 0); - T_eq_sz(log_2.log.capacity, 2); - T_eq_u64(log_2.log.switches, 0); + T_eq_sz(log_2.header.recorded, 0); + T_eq_sz(log_2.header.capacity, 2); + T_eq_u64(log_2.header.switches, 0); memset(&log_4, 0xff, sizeof(log_4)); log = T_thread_switch_record_4(&log_4); - T_eq_ptr(log, &log_2.log); - T_eq_sz(log_4.log.recorded, 0); - T_eq_sz(log_4.log.capacity, 4); - T_eq_u64(log_4.log.switches, 0); + T_eq_ptr(&log->header, &log_2.header); + T_eq_sz(log_4.header.recorded, 0); + T_eq_sz(log_4.header.capacity, 4); + T_eq_u64(log_4.header.switches, 0); memset(&log_10, 0xff, sizeof(log_10)); log = T_thread_switch_record_10(&log_10); - T_eq_ptr(log, &log_4.log); - T_eq_sz(log_10.log.recorded, 0); - T_eq_sz(log_10.log.capacity, 10); - T_eq_u64(log_10.log.switches, 0); + T_eq_ptr(&log->header, &log_4.header); + T_eq_sz(log_10.header.recorded, 0); + T_eq_sz(log_10.header.capacity, 10); + T_eq_u64(log_10.header.switches, 0); for (i = 0; i < 6; ++i) { rtems_status_code sc; @@ -315,10 +315,10 @@ T_TEST_CASE(TestThreadSwitch) } log = T_thread_switch_record(NULL); - T_eq_ptr(log, &log_10.log); - T_eq_sz(log->recorded, 10); - T_eq_sz(log->capacity, 10); - T_eq_u64(log->switches, 12); + T_eq_ptr(&log->header, &log_10.header); + T_eq_sz(log->header.recorded, 10); + T_eq_sz(log->header.capacity, 10); + T_eq_u64(log->header.switches, 12); executing = rtems_task_self(); T_eq_u32(log->events[0].executing, executing); T_ne_u32(log->events[0].heir, 0); -- cgit v1.2.3