Skip to content

Commit 2d8f710

Browse files
stephanosionashif
authored andcommitted
tests: cmsis_rtos_v2: Fix warning in old GCC.
This commit modifies the struct array initialisation expression using the "universal initialiser" to a struct single element initialisation expression in order to prevent old GCC versions from erroneously reporting the "missing braces around initializer" warning. This is an infamous bug in old GCC versions; since there is no side effect of using this alternate initialisation expression and it does not violate the C99 standard, this problem should be addressed in the code for the sake of portability. Signed-off-by: Stephanos Ioannidis <[email protected]>
1 parent a4b2b5b commit 2d8f710

File tree

1 file changed

+1
-1
lines changed
  • tests/portability/cmsis_rtos_v2/src

1 file changed

+1
-1
lines changed

tests/portability/cmsis_rtos_v2/src/msgq.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ void send_msg_thread(void *argument)
2727
int i;
2828
osStatus_t status;
2929
struct sample_data sample;
30-
struct sample_data data[Q_LEN] = { 0 };
30+
struct sample_data data[Q_LEN] = { { 0 } };
3131

3232
/* Wait for message_recv to complete initial checks */
3333
osDelay(TIMEOUT_TICKS);

0 commit comments

Comments
 (0)