diff --git a/interfaces/inner_api/src/standard/device_security_level_loader.cpp b/interfaces/inner_api/src/standard/device_security_level_loader.cpp index 90c2e2d..b623687 100644 --- a/interfaces/inner_api/src/standard/device_security_level_loader.cpp +++ b/interfaces/inner_api/src/standard/device_security_level_loader.cpp @@ -66,7 +66,9 @@ void DeviceSecurityLevelLoader::LoadCallback::OnLoadSystemAbilityFail(int32_t si sptr DeviceSecurityLevelLoader::LoadCallback::Promise() { - return promise_.get_future().get(); + auto obj = promise_.get_future().get(); + promise_ = {}; + return obj; } } // namespace DeviceSecurityLevel } // namespace Security diff --git a/services/dslm/dslm_device_list.c b/services/dslm/dslm_device_list.c index 9ad06b5..5beff26 100644 --- a/services/dslm/dslm_device_list.c +++ b/services/dslm/dslm_device_list.c @@ -152,7 +152,7 @@ void ForEachDeviceDump(const ProcessDumpFunction dumper, int32_t dumpHandle) UnlockMutex(GetDeviceListMutex()); } -bool JudgeListDeviceType() +bool JudgeListDeviceType(void) { bool result = true; ListNode *node = NULL; diff --git a/services/dslm/dslm_device_list.h b/services/dslm/dslm_device_list.h index ee4abec..e38ee41 100644 --- a/services/dslm/dslm_device_list.h +++ b/services/dslm/dslm_device_list.h @@ -41,7 +41,7 @@ bool IsSameDevice(const DeviceIdentify *first, const DeviceIdentify *second); void ForEachDeviceDump(const ProcessDumpFunction dumper, int32_t dumpHandle); -bool JudgeListDeviceType(); +bool JudgeListDeviceType(void); #ifdef __cplusplus }