diff --git a/frameworks/native/src/sensor_service_client.cpp b/frameworks/native/src/sensor_service_client.cpp old mode 100755 new mode 100644 index b258b56595b52453ca27da4d29c6ba81960ec9db..11d782258ce6611c0e52c178f3e77f496765f55c --- a/frameworks/native/src/sensor_service_client.cpp +++ b/frameworks/native/src/sensor_service_client.cpp @@ -77,7 +77,9 @@ int32_t SensorServiceClient::InitServiceClient() CHKPR(systemAbilityManager, SENSOR_NATIVE_SAM_ERR); int32_t retry = 0; while (retry < GET_SERVICE_MAX_COUNT) { - sensorServer_ = iface_cast(systemAbilityManager->GetSystemAbility(SENSOR_SERVICE_ABILITY_ID)); + auto object = systemAbilityManager->GetSystemAbility(SENSOR_SERVICE_ABILITY_ID); + CHKPR(object, SENSOR_NATIVE_GET_SERVICE_ERR); + sensorServer_ = iface_cast(object); if (sensorServer_ != nullptr) { SEN_HILOGD("Get service success, retry:%{public}d", retry); serviceDeathObserver_ = new (std::nothrow) DeathRecipientTemplate(*const_cast(this)); diff --git a/vibration_convert/core/algorithm/peak_finder/src/peak_finder.cpp b/vibration_convert/core/algorithm/peak_finder/src/peak_finder.cpp index b9e0023a26b9cc42308bc0dc389692c2c6cae2b4..9ea09d51e8dbae53d4088acc204efbd10f18737a 100644 --- a/vibration_convert/core/algorithm/peak_finder/src/peak_finder.cpp +++ b/vibration_convert/core/algorithm/peak_finder/src/peak_finder.cpp @@ -631,14 +631,12 @@ void PeakFinder::SplitLongShortEnvelope(int32_t dataSize, const std::vector