summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChih-Hung Hsieh <chh@google.com>2018-10-26 14:22:19 -0700
committerandroid-build-merger <android-build-merger@google.com>2018-10-26 14:22:19 -0700
commite1cc59d443634b69daf53f2fa8210d25d2041e21 (patch)
treefdeff5e6aeaee7725c695d34ee557beaba0621a1
parent37c4239adce447dae6157a88697cbc3e07d8e872 (diff)
parentbf044c805b81b34318a25bdc2507e1952a817bff (diff)
downloaddevice_google_contexthub-e1cc59d443634b69daf53f2fa8210d25d2041e21.tar.gz
device_google_contexthub-e1cc59d443634b69daf53f2fa8210d25d2041e21.tar.bz2
device_google_contexthub-e1cc59d443634b69daf53f2fa8210d25d2041e21.zip
Fix implicit-fallthrough warnings locally.
am: bf044c805b Change-Id: Ie736c30940b1c36e53770f0deedb1ca0a9b47cd2
-rw-r--r--sensorhal/hubconnection.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/sensorhal/hubconnection.cpp b/sensorhal/hubconnection.cpp
index 6bf35125..83392f21 100644
--- a/sensorhal/hubconnection.cpp
+++ b/sensorhal/hubconnection.cpp
@@ -815,6 +815,7 @@ void HubConnection::processSample(uint64_t timestamp, uint32_t type, uint32_t se
&& isSampleIntervalSatisfied(COMMS_SENSOR_MAG_UNCALIBRATED, timestamp)) {
++cnt;
}
+ break;
default:
break;
}
@@ -2308,15 +2309,14 @@ uint64_t HubConnection::rateLevelToDeviceSamplingPeriodNs(int handle, int rateLe
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;
}