From 782152f404b9dfd96f9922f62c466b8e4e06c953 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Mon, 13 Jan 2025 11:53:59 -0800 Subject: [PATCH] tests: i2c_emul: Remove unused variable Building with clang warns: tests/drivers/i2c/i2c_emul/src/test_forwarding_buf.cpp:20:32: error: unused variable 'targets' [-Werror,-Wunused-const-variable] constexpr const struct device *targets[FORWARD_COUNT] = { ^ Signed-off-by: Tom Hughes --- tests/drivers/i2c/i2c_emul/src/test_forwarding_buf.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/drivers/i2c/i2c_emul/src/test_forwarding_buf.cpp b/tests/drivers/i2c/i2c_emul/src/test_forwarding_buf.cpp index 1bcf7942d45..7bf687a3a47 100644 --- a/tests/drivers/i2c/i2c_emul/src/test_forwarding_buf.cpp +++ b/tests/drivers/i2c/i2c_emul/src/test_forwarding_buf.cpp @@ -15,8 +15,6 @@ namespace /* Get the devicetree constants */ constexpr const struct device *controller = DEVICE_DT_GET(CONTROLLER_LABEL); -constexpr const struct device *targets[FORWARD_COUNT] = { - DT_FOREACH_PROP_ELEM_SEP(CONTROLLER_LABEL, forwards, DEVICE_DT_GET_BY_IDX, (,))}; ZTEST(i2c_emul_forwarding, test_write_is_forwarded) {