Skip to content

Commit

Permalink
Fix #12020: misra-test.c: wrong syntax in some test cases (#5597)
Browse files Browse the repository at this point in the history
  • Loading branch information
swasti16 authored Oct 26, 2023
1 parent fdb3de7 commit 689187d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions addons/test/misra/misra-test.c
Original file line number Diff line number Diff line change
Expand Up @@ -578,13 +578,13 @@ static void misra_9_struct_initializers(void) {
// Struct with fields of unknown type
struct_with_unknown_fields ufa = { 1, { 1, 2 }, { 1, 2 } };
struct_with_unknown_fields ufb = { 1, 1, 2 }; // 9.2
struct_with_unknown_fields[2] ufc = { {1, { 1, 2 }, { 1, 2 } },
struct_with_unknown_fields ufc[2] = { {1, { 1, 2 }, { 1, 2 } },
{ 2, { 1, 2 }, { 1, 2 } } };
struct_with_unknown_fields[2][2] ufd = { {1, { 1, 2 }, { 1, 2 } },
struct_with_unknown_fields ufd[2][2] = { {1, { 1, 2 }, { 1, 2 } }, // 9.2 9.3
{ 2, { 1, 2 }, { 1, 2 } } };
struct_with_unknown_fields[2] ufe = { 1, { 1, 2 }, { 1, 2 }, // TODO: 9.2
struct_with_unknown_fields ufe[2] = { 1, { 1, 2 }, { 1, 2 }, // 9.2 9.3
2, { 1, 2 }, { 1, 2 } };
struct_with_unknown_fields[3] uff = { { 1, { 1, 2 }, { 1, 2 }}, // TODO: 9.3 9.4
struct_with_unknown_fields uff[3] = { { 1, { 1, 2 }, { 1, 2 }}, // 9.3 9.4
{2, { 1, 2 }, { 1, 2 }},
[1] = { 2, { 1, 2 }, { 1, 2 }} };

Expand Down

0 comments on commit 689187d

Please sign in to comment.