summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChih-Hung Hsieh <chh@google.com>2018-10-26 14:26:23 -0700
committerandroid-build-merger <android-build-merger@google.com>2018-10-26 14:26:23 -0700
commitb5b00f8f33a2b3e536f26ff0e43492cbc6365183 (patch)
treefdeff5e6aeaee7725c695d34ee557beaba0621a1
parent3360bf93b7d4c93619f6a3fcc1233bb4e4faccca (diff)
parente1cc59d443634b69daf53f2fa8210d25d2041e21 (diff)
downloaddevice_google_contexthub-b5b00f8f33a2b3e536f26ff0e43492cbc6365183.tar.gz
device_google_contexthub-b5b00f8f33a2b3e536f26ff0e43492cbc6365183.tar.bz2
device_google_contexthub-b5b00f8f33a2b3e536f26ff0e43492cbc6365183.zip
Fix implicit-fallthrough warnings locally. am: bf044c805b
am: e1cc59d443 Change-Id: I445171d3441b0778752a544fd181d9c7d5677ff2
-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;
}