From 689187d82a5e431b9abd639c570ad34dc9b40e64 Mon Sep 17 00:00:00 2001 From: Swasti Shrivastava <37058682+swasti16@users.noreply.github.com> Date: Thu, 26 Oct 2023 22:07:44 +0530 Subject: [PATCH] Fix #12020: misra-test.c: wrong syntax in some test cases (#5597) --- addons/test/misra/misra-test.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/test/misra/misra-test.c b/addons/test/misra/misra-test.c index e9c61ad32..35291c45e 100644 --- a/addons/test/misra/misra-test.c +++ b/addons/test/misra/misra-test.c @@ -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 }} };