Skip to content

Commit e428a52

Browse files
fabiobaltierinashif
authored andcommittedSep 23, 2024
tests: i2c_emul: drop the array designators
Drop the array dasignators as they generate a warning: array designators are a C99 extension warning when compiling with clang. Not too sure if this is an actual problem or if the warning should be disabled instead but since it's just a test it should be fine to just drop them. Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
1 parent b094167 commit e428a52

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎tests/drivers/i2c/i2c_emul/src/emulated_target.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ DT_FOREACH_PROP_ELEM(CONTROLLER_LABEL, forwards, DEFINE_FAKE_TARGET_FUNCTION);
2525

2626
/* clang-format off */
2727
#define DEFINE_EMULATED_CALLBACK(node_id, prop, n) \
28-
[n] = { \
28+
{ \
2929
.write_requested = target_write_requested_##n, \
3030
.read_requested = target_read_requested_##n, \
3131
.write_received = target_write_received_##n, \
@@ -42,7 +42,7 @@ struct i2c_target_callbacks emulated_callbacks[FORWARD_COUNT] = {
4242
DT_FOREACH_PROP_ELEM(CONTROLLER_LABEL, forwards, DEFINE_EMULATED_CALLBACK)};
4343

4444
#define DEFINE_EMULATED_TARGET_CONFIG(node_id, prop, n) \
45-
[n] = { \
45+
{ \
4646
.flags = 0, \
4747
.address = DT_PHA_BY_IDX(node_id, prop, n, addr), \
4848
.callbacks = &emulated_callbacks[n], \

0 commit comments

Comments
 (0)
Please sign in to comment.