diff options
author | Chih-Hung Hsieh <chh@google.com> | 2018-10-26 11:18:01 -0700 |
---|---|---|
committer | Chih-Hung Hsieh <chh@google.com> | 2018-10-26 11:18:01 -0700 |
commit | bf044c805b81b34318a25bdc2507e1952a817bff (patch) | |
tree | fdeff5e6aeaee7725c695d34ee557beaba0621a1 | |
parent | c6f7eac2ff77b21921cf9667dbcd293fe710f2cc (diff) | |
download | device_google_contexthub-bf044c805b81b34318a25bdc2507e1952a817bff.tar.gz device_google_contexthub-bf044c805b81b34318a25bdc2507e1952a817bff.tar.bz2 device_google_contexthub-bf044c805b81b34318a25bdc2507e1952a817bff.zip |
Fix implicit-fallthrough warnings locally.android-o-mr1-iot-release-smart-display-r9android-o-mr1-iot-release-smart-display-r8android-o-mr1-iot-release-smart-display-r5android-o-mr1-iot-release-smart-display-r4android-o-mr1-iot-release-smart-display-r22android-o-mr1-iot-release-smart-display-r14android-o-mr1-iot-release-smart-clock-r6android-o-mr1-iot-release-smart-clock-r2android-o-mr1-iot-release-smart-clock-fsiandroid-o-mr1-iot-release-smart-clock-fcsandroid-n-iot-release-ihome-igv1nougat-iot-release
It will be a global error by default.
Test: make checkbuild
Bug: 112564944
Change-Id: Ia3466649cdddcc754de554edd96a674d00630733
-rw-r--r-- | sensorhal/hubconnection.cpp | 6 |
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; } |