From 1eb508b123bd4b5764ea3956ccf1b49ceb321fcd Mon Sep 17 00:00:00 2001 From: Jeremy Bettis Date: Mon, 30 Aug 2021 15:40:09 -0600 Subject: zephyr: Removing unused vars zephyr toolchain doesn't allow unused vars, so this is preventing running tests on gitlab. Add -Werror=unused-variable to clang args so that this doesn't backslide. BUG=None TEST=zmake coverage on docker BRANCH=None Signed-off-by: Jeremy Bettis Change-Id: I7749041fd0f09e5cf35e6a6c1d4555af805469c6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3131880 Commit-Queue: Jeremy Bettis Tested-by: Jeremy Bettis Reviewed-by: Jack Rosenthal --- zephyr/emul/emul_bma255.c | 1 - zephyr/emul/emul_bmi.c | 2 -- zephyr/emul/emul_bmi160.c | 3 --- zephyr/emul/emul_bmi260.c | 4 ---- zephyr/emul/emul_pi3usb9201.c | 3 --- zephyr/emul/emul_smart_battery.c | 2 -- zephyr/emul/emul_syv682x.c | 4 ---- zephyr/emul/emul_tcs3400.c | 1 - 8 files changed, 20 deletions(-) (limited to 'zephyr/emul') diff --git a/zephyr/emul/emul_bma255.c b/zephyr/emul/emul_bma255.c index f7a18b0697..073e196df8 100644 --- a/zephyr/emul/emul_bma255.c +++ b/zephyr/emul/emul_bma255.c @@ -1047,7 +1047,6 @@ static int bma_emul_transfer(struct i2c_emul *emul, struct i2c_msg *msgs, { const struct bma_emul_cfg *cfg; struct bma_emul_data *data; - unsigned int len; int ret, i, reg; bool read; diff --git a/zephyr/emul/emul_bmi.c b/zephyr/emul/emul_bmi.c index b5a8de8b5a..d6807d3961 100644 --- a/zephyr/emul/emul_bmi.c +++ b/zephyr/emul/emul_bmi.c @@ -1125,7 +1125,6 @@ static int bmi_emul_handle_read(struct i2c_emul *emul, int reg, int byte, char *buf) { struct bmi_emul_data *data; - uint16_t fifo_len; int ret; data = CONTAINER_OF(emul, struct bmi_emul_data, emul); @@ -1175,7 +1174,6 @@ static int bmi_emul_transfer(struct i2c_emul *emul, struct i2c_msg *msgs, { const struct bmi_emul_cfg *cfg; struct bmi_emul_data *data; - unsigned int len; int ret, i; bool read; diff --git a/zephyr/emul/emul_bmi160.c b/zephyr/emul/emul_bmi160.c index 8f6572604f..d080574de5 100644 --- a/zephyr/emul/emul_bmi160.c +++ b/zephyr/emul/emul_bmi160.c @@ -404,7 +404,6 @@ static void bmi160_emul_handle_off_comp(uint8_t *regs, struct i2c_emul *emul) static int bmi160_emul_start_cmd(uint8_t *regs, struct i2c_emul *emul, int cmd) { int time; - int ret; switch (cmd) { case BMI160_CMD_SOFT_RESET: @@ -566,7 +565,6 @@ static int bmi160_emul_handle_write(uint8_t *regs, struct i2c_emul *emul, { bool tag_time; bool header; - int ret; if (byte > 1) { LOG_ERR("Block writes are not allowed"); @@ -636,7 +634,6 @@ static int bmi160_emul_handle_read(uint8_t *regs, struct i2c_emul *emul, bool header; int gyr_shift; int acc_shift; - int ret; /* * If register is FIFO data, then read data from FIFO. diff --git a/zephyr/emul/emul_bmi260.c b/zephyr/emul/emul_bmi260.c index 82ca5626ee..69b0e86871 100644 --- a/zephyr/emul/emul_bmi260.c +++ b/zephyr/emul/emul_bmi260.c @@ -281,7 +281,6 @@ static int bmi260_emul_gyr_range_to_shift(uint8_t range) static int bmi260_emul_start_cmd(uint8_t *regs, struct i2c_emul *emul, int cmd) { int time; - int ret; switch (cmd) { case BMI260_CMD_SOFT_RESET: @@ -309,7 +308,6 @@ static int bmi260_emul_start_cmd(uint8_t *regs, struct i2c_emul *emul, int cmd) */ static void bmi260_emul_end_cmd(uint8_t *regs, struct i2c_emul *emul) { - uint8_t pmu_status; bool tag_time; bool header; int cmd; @@ -354,7 +352,6 @@ static int bmi260_emul_handle_write(uint8_t *regs, struct i2c_emul *emul, uint8_t mask; bool tag_time; bool header; - int ret; /* Ignore first byte which sets starting register */ byte -= 1; @@ -440,7 +437,6 @@ static int bmi260_emul_handle_read(uint8_t *regs, struct i2c_emul *emul, bool header; int gyr_shift; int acc_shift; - int ret; /* * If register is FIFO data, then read data from FIFO. diff --git a/zephyr/emul/emul_pi3usb9201.c b/zephyr/emul/emul_pi3usb9201.c index d00ffe24c6..7feedbf7d0 100644 --- a/zephyr/emul/emul_pi3usb9201.c +++ b/zephyr/emul/emul_pi3usb9201.c @@ -96,9 +96,6 @@ static int pi3usb9201_emul_transfer(struct i2c_emul *emul, struct i2c_msg *msgs, { const struct pi3usb9201_emul_cfg *cfg; struct pi3usb9201_emul_data *data; - unsigned int len; - int ret, i, reg; - bool read; data = CONTAINER_OF(emul, struct pi3usb9201_emul_data, emul); cfg = data->cfg; diff --git a/zephyr/emul/emul_smart_battery.c b/zephyr/emul/emul_smart_battery.c index 23ac01262c..392b9a292b 100644 --- a/zephyr/emul/emul_smart_battery.c +++ b/zephyr/emul/emul_smart_battery.c @@ -294,7 +294,6 @@ static int sbat_emul_read_at_rate_ok(struct sbat_emul_bat_data *bat, { int rem_time_s; int rate; - int cap; rate = bat->at_rate; if (bat->mode & MODE_CAPACITY) { @@ -799,7 +798,6 @@ static int sbat_emul_transfer(struct i2c_emul *emul, struct i2c_msg *msgs, { const struct sbat_emul_cfg *cfg; struct sbat_emul_data *data; - unsigned int len; int ret = 0, i; data = CONTAINER_OF(emul, struct sbat_emul_data, emul); diff --git a/zephyr/emul/emul_syv682x.c b/zephyr/emul/emul_syv682x.c index 796f162fde..b9c850bcd8 100644 --- a/zephyr/emul/emul_syv682x.c +++ b/zephyr/emul/emul_syv682x.c @@ -82,10 +82,6 @@ static int syv682x_emul_transfer(struct i2c_emul *emul, struct i2c_msg *msgs, { const struct syv682x_emul_cfg *cfg; struct syv682x_emul_data *data; - unsigned int len; - int ret, i, reg; - bool read; - data = CONTAINER_OF(emul, struct syv682x_emul_data, emul); cfg = data->cfg; diff --git a/zephyr/emul/emul_tcs3400.c b/zephyr/emul/emul_tcs3400.c index ea2e2e7690..874b343a6b 100644 --- a/zephyr/emul/emul_tcs3400.c +++ b/zephyr/emul/emul_tcs3400.c @@ -677,7 +677,6 @@ static int tcs_emul_transfer(struct i2c_emul *emul, struct i2c_msg *msgs, { const struct tcs_emul_cfg *cfg; struct tcs_emul_data *data; - unsigned int len; int ret, i, reg; bool read; -- cgit v1.2.1