Fix implicit-fallthrough warnings locally.
It will be a global error by default.
Test: make checkbuild
Bug: 112564944
Change-Id: Ia3466649cdddcc754de554edd96a674d00630733
diff --git a/sensorhal/hubconnection.cpp b/sensorhal/hubconnection.cpp
index 6bf3512..83392f2 100644
--- a/sensorhal/hubconnection.cpp
+++ b/sensorhal/hubconnection.cpp
@@ -815,6 +815,7 @@
&& isSampleIntervalSatisfied(COMMS_SENSOR_MAG_UNCALIBRATED, timestamp)) {
++cnt;
}
+ break;
default:
break;
}
@@ -2308,15 +2309,14 @@
switch (rateLevel) {
case SENSOR_DIRECT_RATE_VERY_FAST:
- // No sensor support VERY_FAST, fall through
+ [[fallthrough]]; // No sensor support VERY_FAST, fall through
case SENSOR_DIRECT_RATE_FAST:
if (handle != COMMS_SENSOR_MAG && handle != COMMS_SENSOR_MAG_UNCALIBRATED) {
return 2500*1000; // 400Hz
}
- // fall through
+ [[fallthrough]];
case SENSOR_DIRECT_RATE_NORMAL:
return 20*1000*1000; // 50 Hz
- // fall through
default:
return INT64_MAX;
}