From 24dbe033abc2c08dbb4252437949b22085840ae0 Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Thu, 3 Mar 2022 22:58:16 -0600 Subject: [PATCH] Update: Stop using GNU old-style field designator extension. Apparently this is a GNU extension rather than a standard C language style. Switch to the more correct style. This issue is exposed by CLang and not GCC. --- level_0/f_type_array/tests/unit/c/test-type_array-cells_append.c | 4 ++-- level_0/f_type_array/tests/unit/c/test-type_array-cellss_append.c | 4 ++-- level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_append.c | 4 ++-- level_0/f_type_array/tests/unit/c/test-type_array-fll_idss_append.c | 4 ++-- level_0/f_type_array/tests/unit/c/test-type_array-states_append.c | 4 ++-- level_0/f_type_array/tests/unit/c/test-type_array-statess_append.c | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-cells_append.c b/level_0/f_type_array/tests/unit/c/test-type_array-cells_append.c index 76299e8..605d3a0 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-cells_append.c +++ b/level_0/f_type_array/tests/unit/c/test-type_array-cells_append.c @@ -11,8 +11,8 @@ void test__f_type_array_cells_append__works(void **state) { f_cells_t source = f_cells_t_initialize; f_cells_t destination = f_cells_t_initialize; - const f_cell_t cell_0 = { row: 1, column: 2 }; - const f_cell_t cell_1 = { row: 3, column: 4 }; + const f_cell_t cell_0 = { .row = 1, .column = 2 }; + const f_cell_t cell_1 = { .row = 3, .column = 4 }; { const f_status_t status = f_cells_resize(length, &source); diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-cellss_append.c b/level_0/f_type_array/tests/unit/c/test-type_array-cellss_append.c index c4ea9c0..4f6d345 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-cellss_append.c +++ b/level_0/f_type_array/tests/unit/c/test-type_array-cellss_append.c @@ -12,8 +12,8 @@ void test__f_type_array_cellss_append__works(void **state) { f_cellss_t source = f_cells_t_initialize; f_cellss_t destination = f_cells_t_initialize; - const f_cell_t cell_0 = { row: 1, column: 2 }; - const f_cell_t cell_1 = { row: 3, column: 4 }; + const f_cell_t cell_0 = { .row = 1, .column = 2 }; + const f_cell_t cell_1 = { .row = 3, .column = 4 }; { const f_status_t status = f_cellss_resize(length, &source); diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_append.c b/level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_append.c index 7c72df7..c230324 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_append.c +++ b/level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_append.c @@ -11,8 +11,8 @@ void test__f_type_array_fll_ids_append__works(void **state) { f_fll_ids_t source = f_fll_ids_t_initialize; f_fll_ids_t destination = f_fll_ids_t_initialize; - const f_fll_id_t fll_id_0 = { name: "test", type: 1, used: 4 }; - const f_fll_id_t fll_id_1 = { name: "other", type: 2, used: 5 }; + const f_fll_id_t fll_id_0 = { .name = "test", .type = 1, .used = 4 }; + const f_fll_id_t fll_id_1 = { .name = "other", .type = 2, .used = 5 }; { const f_status_t status = f_fll_ids_resize(length, &source); diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-fll_idss_append.c b/level_0/f_type_array/tests/unit/c/test-type_array-fll_idss_append.c index d0d5bc1..bb7dd28 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-fll_idss_append.c +++ b/level_0/f_type_array/tests/unit/c/test-type_array-fll_idss_append.c @@ -12,8 +12,8 @@ void test__f_type_array_fll_idss_append__works(void **state) { f_fll_idss_t source = f_fll_ids_t_initialize; f_fll_idss_t destination = f_fll_ids_t_initialize; - const f_fll_id_t fll_id_0 = { name: "test", type: 1, used: 4 }; - const f_fll_id_t fll_id_1 = { name: "other", type: 2, used: 5 }; + const f_fll_id_t fll_id_0 = { .name = "test", .type = 1, .used = 4 }; + const f_fll_id_t fll_id_1 = { .name = "other", .type = 2, .used = 5 }; { const f_status_t status = f_fll_idss_resize(length, &source); diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-states_append.c b/level_0/f_type_array/tests/unit/c/test-type_array-states_append.c index c61f3a0..7c6e95b 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-states_append.c +++ b/level_0/f_type_array/tests/unit/c/test-type_array-states_append.c @@ -11,8 +11,8 @@ void test__f_type_array_states_append__works(void **state) { f_states_t source = f_states_t_initialize; f_states_t destination = f_states_t_initialize; - const f_state_t state_0 = { step_large: 10, step_small: 1, handle: 0, interrupt: 0, callbacks: 0, custom: 0, data: 0 }; - const f_state_t state_1 = { step_large: 20, step_small: 2, handle: 0, interrupt: 0, callbacks: 0, custom: 0, data: 0 }; + const f_state_t state_0 = { .step_large = 10, .step_small = 1, .handle = 0, .interrupt = 0, .callbacks = 0, .custom = 0, .data = 0 }; + const f_state_t state_1 = { .step_large = 20, .step_small = 2, .handle = 0, .interrupt = 0, .callbacks = 0, .custom = 0, .data = 0 }; { const f_status_t status = f_states_resize(length, &source); diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-statess_append.c b/level_0/f_type_array/tests/unit/c/test-type_array-statess_append.c index f813a3b..1187742 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-statess_append.c +++ b/level_0/f_type_array/tests/unit/c/test-type_array-statess_append.c @@ -12,8 +12,8 @@ void test__f_type_array_statess_append__works(void **state) { f_statess_t source = f_states_t_initialize; f_statess_t destination = f_states_t_initialize; - const f_state_t state_0 = { step_large: 10, step_small: 1, handle: 0, interrupt: 0, callbacks: 0, custom: 0, data: 0 }; - const f_state_t state_1 = { step_large: 20, step_small: 2, handle: 0, interrupt: 0, callbacks: 0, custom: 0, data: 0 }; + const f_state_t state_0 = { .step_large = 10, .step_small = 1, .handle = 0, .interrupt = 0, .callbacks = 0, .custom = 0, .data = 0 }; + const f_state_t state_1 = { .step_large = 20, .step_small = 2, .handle = 0, .interrupt = 0, .callbacks = 0, .custom = 0, .data = 0 }; { const f_status_t status = f_statess_resize(length, &source); -- 1.8.3.1