summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChih-Hung Hsieh <chh@google.com>2018-10-26 11:18:01 -0700
committerChih-Hung Hsieh <chh@google.com>2018-10-26 11:18:01 -0700
commitbf044c805b81b34318a25bdc2507e1952a817bff (patch)
treefdeff5e6aeaee7725c695d34ee557beaba0621a1
parentc6f7eac2ff77b21921cf9667dbcd293fe710f2cc (diff)
downloaddevice_google_contexthub-bf044c805b81b34318a25bdc2507e1952a817bff.tar.gz
device_google_contexthub-bf044c805b81b34318a25bdc2507e1952a817bff.tar.bz2
device_google_contexthub-bf044c805b81b34318a25bdc2507e1952a817bff.zip
It will be a global error by default. Test: make checkbuild Bug: 112564944 Change-Id: Ia3466649cdddcc754de554edd96a674d00630733
-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;
}