diff options
author | Tom Hughes <tomhughes@chromium.org> | 2022-10-11 15:55:33 -0700 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-10-15 01:32:48 +0000 |
commit | aabf5bf9a3a943a2c69355ddab98fe8263293781 (patch) | |
tree | c99dc2749360ed186bd8bc3336adc4a30be84217 | |
parent | a78f22de6b33f79edc8b76a27d41cefe514f12bc (diff) | |
download | chrome-ec-aabf5bf9a3a943a2c69355ddab98fe8263293781.tar.gz |
tree: Disable false positive warning when building with clang
BRANCH=none
BUG=b:172020503, b:253292373
TEST=./util/build_with_clang.py
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Change-Id: I1ef6244d426c8b611be8766575916bbd38429772
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3953489
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
-rw-r--r-- | board/eve/board.c | 4 | ||||
-rw-r--r-- | board/kukui/board.c | 3 | ||||
-rw-r--r-- | board/poppy/board.c | 3 | ||||
-rw-r--r-- | board/reef/board.c | 3 | ||||
-rw-r--r-- | board/reef_mchp/board.c | 3 |
5 files changed, 16 insertions, 0 deletions
diff --git a/board/eve/board.c b/board/eve/board.c index 9b7395b039..3f5da1a83a 100644 --- a/board/eve/board.c +++ b/board/eve/board.c @@ -14,6 +14,7 @@ #include "charge_ramp.h" #include "charger.h" #include "chipset.h" +#include "compiler.h" #include "console.h" #include "device_event.h" #include "driver/accel_kionix.h" @@ -966,7 +967,10 @@ struct motion_sensor_t motion_sensors[] = { .default_range = BIT(11), /* 16LSB / uT, fixed */ .rot_standard_ref = &mag_standard_ref, .min_frequency = BMM150_MAG_MIN_FREQ, +/* TODO(b/253292373): Remove when clang is fixed. */ +DISABLE_CLANG_WARNING("-Wshift-count-negative") .max_frequency = BMM150_MAG_MAX_FREQ(SPECIAL), +ENABLE_CLANG_WARNING("-Wshift-count-negative") }, [LID_LIGHT] = { diff --git a/board/kukui/board.c b/board/kukui/board.c index 6fafc949e1..27ff7274d8 100644 --- a/board/kukui/board.c +++ b/board/kukui/board.c @@ -518,7 +518,10 @@ struct motion_sensor_t motion_sensors[] = { .default_range = BIT(11), /* 16LSB / uT, fixed */ .rot_standard_ref = &mag_standard_ref, .min_frequency = BMM150_MAG_MIN_FREQ, +/* TODO(b/253292373): Remove when clang is fixed. */ +DISABLE_CLANG_WARNING("-Wshift-count-negative") .max_frequency = BMM150_MAG_MAX_FREQ(SPECIAL), +ENABLE_CLANG_WARNING("-Wshift-count-negative") }, #endif /* CONFIG_MAG_BMI_BMM150 */ [CLEAR_ALS] = { diff --git a/board/poppy/board.c b/board/poppy/board.c index a69fdd3f16..38183c0da0 100644 --- a/board/poppy/board.c +++ b/board/poppy/board.c @@ -828,7 +828,10 @@ struct motion_sensor_t motion_sensors[] = { .default_range = BIT(11), /* 16LSB / uT, fixed */ .rot_standard_ref = &mag_standard_ref, .min_frequency = BMM150_MAG_MIN_FREQ, +/* TODO(b/253292373): Remove when clang is fixed. */ +DISABLE_CLANG_WARNING("-Wshift-count-negative") .max_frequency = BMM150_MAG_MAX_FREQ(SPECIAL), +ENABLE_CLANG_WARNING("-Wshift-count-negative") }, [LID_ALS] = { .name = "Light", diff --git a/board/reef/board.c b/board/reef/board.c index 5e608ee4ee..e41921a436 100644 --- a/board/reef/board.c +++ b/board/reef/board.c @@ -810,7 +810,10 @@ struct motion_sensor_t motion_sensors[] = { .default_range = BIT(11), /* 16LSB / uT, fixed */ .rot_standard_ref = &mag_standard_ref, .min_frequency = BMM150_MAG_MIN_FREQ, +/* TODO(b/253292373): Remove when clang is fixed. */ +DISABLE_CLANG_WARNING("-Wshift-count-negative") .max_frequency = BMM150_MAG_MAX_FREQ(SPECIAL), +ENABLE_CLANG_WARNING("-Wshift-count-negative") }, [BASE_BARO] = { .name = "Base Baro", diff --git a/board/reef_mchp/board.c b/board/reef_mchp/board.c index 39196cb308..0a40f5dd04 100644 --- a/board/reef_mchp/board.c +++ b/board/reef_mchp/board.c @@ -1023,7 +1023,10 @@ struct motion_sensor_t motion_sensors[] = { .default_range = BIT(11), /* 16LSB / uT, fixed */ .rot_standard_ref = &mag_standard_ref, .min_frequency = BMM150_MAG_MIN_FREQ, +/* TODO(b/253292373): Remove when clang is fixed. */ +DISABLE_CLANG_WARNING("-Wshift-count-negative") .max_frequency = BMM150_MAG_MAX_FREQ(SPECIAL), +ENABLE_CLANG_WARNING("-Wshift-count-negative") }, [BASE_BARO] = { .name = "Base Baro", |