Fix #12020: misra-test.c: wrong syntax in some test cases (#5597)

This commit is contained in:
Swasti Shrivastava 2023-10-26 22:07:44 +05:30 committed by GitHub
parent fdb3de708e
commit 689187d82a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -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 }} };