summaryrefslogtreecommitdiff
path: root/zephyr/test
diff options
context:
space:
mode:
authorJeremy Bettis <jbettis@google.com>2021-08-30 15:40:09 -0600
committerCommit Bot <commit-bot@chromium.org>2021-08-31 18:49:14 +0000
commit1eb508b123bd4b5764ea3956ccf1b49ceb321fcd (patch)
tree7c9152dc08c8f83885d26d4c3787613cada7c8b0 /zephyr/test
parented87c0c1ade57ab6e8bd46a11a2f0484a503f1b8 (diff)
downloadchrome-ec-1eb508b123bd4b5764ea3956ccf1b49ceb321fcd.tar.gz
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 <jbettis@google.com> Change-Id: I7749041fd0f09e5cf35e6a6c1d4555af805469c6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3131880 Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Tested-by: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Diffstat (limited to 'zephyr/test')
-rw-r--r--zephyr/test/drivers/src/bma2x2.c3
-rw-r--r--zephyr/test/drivers/src/bmi160.c2
-rw-r--r--zephyr/test/drivers/src/bmi260.c2
-rw-r--r--zephyr/test/drivers/src/tcs3400.c5
4 files changed, 2 insertions, 10 deletions
diff --git a/zephyr/test/drivers/src/bma2x2.c b/zephyr/test/drivers/src/bma2x2.c
index dffd4ee0be..457aeeef5d 100644
--- a/zephyr/test/drivers/src/bma2x2.c
+++ b/zephyr/test/drivers/src/bma2x2.c
@@ -607,8 +607,6 @@ static void test_bma_read(void)
int16_t ret_acc[3];
int16_t exp_acc[3];
intv3_t ret_acc_v;
- uint8_t reg_rate;
- int drv_rate;
emul = bma_emul_get(BMA_ORD);
@@ -728,7 +726,6 @@ static int emul_write_calib_func(struct i2c_emul *emul, int reg, uint8_t val,
void *data)
{
struct calib_func_data *d = data;
- int cur_time;
if (reg != BMA2x2_OFFSET_CTRL_ADDR) {
return 1;
diff --git a/zephyr/test/drivers/src/bmi160.c b/zephyr/test/drivers/src/bmi160.c
index 2a1494ef9b..d0cfed200d 100644
--- a/zephyr/test/drivers/src/bmi160.c
+++ b/zephyr/test/drivers/src/bmi160.c
@@ -1547,7 +1547,6 @@ static void test_bmi_init(void)
{
struct motion_sensor_t *ms_acc, *ms_gyr;
struct i2c_emul *emul;
- int ret;
emul = bmi_emul_get(BMI_ORD);
ms_acc = &motion_sensors[BMI_ACC_SENSOR_ID];
@@ -1681,7 +1680,6 @@ static void check_fifo_f(struct motion_sensor_t *ms_acc,
/** Test irq handler of accelerometer sensor */
static void test_bmi_acc_fifo(void)
{
- struct ec_response_motion_sensor_data vector;
struct motion_sensor_t *ms, *ms_gyr;
struct fifo_func_data func_data;
struct bmi_emul_frame f[3];
diff --git a/zephyr/test/drivers/src/bmi260.c b/zephyr/test/drivers/src/bmi260.c
index a8aa303765..63b5da0784 100644
--- a/zephyr/test/drivers/src/bmi260.c
+++ b/zephyr/test/drivers/src/bmi260.c
@@ -1531,7 +1531,6 @@ static void test_bmi_init(void)
{
struct motion_sensor_t *ms_acc, *ms_gyr;
struct i2c_emul *emul;
- int ret;
emul = bmi_emul_get(BMI_ORD);
ms_acc = &motion_sensors[BMI_ACC_SENSOR_ID];
@@ -1673,7 +1672,6 @@ static void check_fifo_f(struct motion_sensor_t *ms_acc,
/** Test irq handler of accelerometer sensor */
static void test_bmi_acc_fifo(void)
{
- struct ec_response_motion_sensor_data vector;
struct motion_sensor_t *ms, *ms_gyr;
struct fifo_func_data func_data;
struct bmi_emul_frame f[3];
diff --git a/zephyr/test/drivers/src/tcs3400.c b/zephyr/test/drivers/src/tcs3400.c
index 7f9ce38351..8aaa3c2f38 100644
--- a/zephyr/test/drivers/src/tcs3400.c
+++ b/zephyr/test/drivers/src/tcs3400.c
@@ -229,7 +229,6 @@ static void test_tcs_read_calibration(void)
uint32_t event = TCS_INT_EVENT;
int emul_v[4];
int exp_v[4];
- int ret;
intv3_t v;
emul = tcs_emul_get(TCS_ORD);
@@ -359,7 +358,7 @@ static void test_tcs_read_xyz(void)
MOTION_SENSE_DEFAULT_SCALE, MOTION_SENSE_DEFAULT_SCALE,
MOTION_SENSE_DEFAULT_SCALE, MOTION_SENSE_DEFAULT_SCALE
};
- int ret, i, test;
+ int i, test;
intv3_t v;
emul = tcs_emul_get(TCS_ORD);
@@ -451,7 +450,7 @@ static void test_tcs_scale(void)
};
uint16_t scale[3];
int16_t temp;
- int ret, i, test;
+ int i, test;
intv3_t v;
emul = tcs_emul_get(TCS_ORD);