]> Kevux Git Server - fll/commitdiff
Update: Stop using GNU old-style field designator extension.
authorKevin Day <thekevinday@gmail.com>
Fri, 4 Mar 2022 04:58:16 +0000 (22:58 -0600)
committerKevin Day <thekevinday@gmail.com>
Fri, 4 Mar 2022 04:58:16 +0000 (22:58 -0600)
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
level_0/f_type_array/tests/unit/c/test-type_array-cellss_append.c
level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_append.c
level_0/f_type_array/tests/unit/c/test-type_array-fll_idss_append.c
level_0/f_type_array/tests/unit/c/test-type_array-states_append.c
level_0/f_type_array/tests/unit/c/test-type_array-statess_append.c

index 76299e8..605d3a0 100644 (file)
@@ -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);
index c4ea9c0..4f6d345 100644 (file)
@@ -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);
index 7c72df7..c230324 100644 (file)
@@ -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);
index d0d5bc1..bb7dd28 100644 (file)
@@ -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);
index c61f3a0..7c6e95b 100644 (file)
@@ -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);
index f813a3b..1187742 100644 (file)
@@ -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);