diff --git a/frameworks/innerkitsimpl/distributeddatafwk/src/distributed_kv_data_manager.cpp b/frameworks/innerkitsimpl/distributeddatafwk/src/distributed_kv_data_manager.cpp index 58894cf8a28e35c5fa2a182421565f8c2fa56e08..e57cecac4c7e995eaa6a6fa5612720d6bddfdcfb 100644 --- a/frameworks/innerkitsimpl/distributeddatafwk/src/distributed_kv_data_manager.cpp +++ b/frameworks/innerkitsimpl/distributeddatafwk/src/distributed_kv_data_manager.cpp @@ -121,6 +121,7 @@ Status DistributedKvDataManager::GetSingleKvStore(const Options &options, const singleKvStore = std::make_shared(std::move(proxyTmp), storeIdTmp); return status; } + Status DistributedKvDataManager::GetAllKvStoreId(const AppId &appId, std::vector &storeIds) { DdsTrace trace(std::string(LOG_TAG "::") + std::string(__FUNCTION__)); diff --git a/frameworks/innerkitsimpl/distributeddatafwk/src/ikvstore_observer.cpp b/frameworks/innerkitsimpl/distributeddatafwk/src/ikvstore_observer.cpp index a9d0a58305beff3dbd4e1adf2f900c15da7352c7..988de01ea97df48362f5f57702b06598ccd6bf8e 100644 --- a/frameworks/innerkitsimpl/distributeddatafwk/src/ikvstore_observer.cpp +++ b/frameworks/innerkitsimpl/distributeddatafwk/src/ikvstore_observer.cpp @@ -133,7 +133,7 @@ bool ReadFromBuff(MessageParcel &data, const int &len, const int &bufferSize, st { const uint8_t *buffer = reinterpret_cast(data.ReadRawData(bufferSize)); if (buffer == nullptr) { - ZLOGE("new buffer filed"); + ZLOGE("new buffer failed"); return false; } int bufferLeftSize = bufferSize; diff --git a/services/distributeddataservice/adapter/broadcaster/src/broadcast_sender_impl.cpp b/services/distributeddataservice/adapter/broadcaster/src/broadcast_sender_impl.cpp index 39b6aac31376262729f5644a5cbafe427eb7eac1..32812ac8c24ceea4d23b2f9c0abb26530e86ed66 100644 --- a/services/distributeddataservice/adapter/broadcaster/src/broadcast_sender_impl.cpp +++ b/services/distributeddataservice/adapter/broadcaster/src/broadcast_sender_impl.cpp @@ -38,6 +38,7 @@ CommonEventSubscriberListener::CommonEventSubscriberListener(const CommonEventSu void CommonEventSubscriberListener::OnReceiveEvent(const CommonEventData &data) { + (void) data; ZLOGI("receive event."); } diff --git a/services/distributeddataservice/adapter/communicator/src/softbus_adapter_standard.cpp b/services/distributeddataservice/adapter/communicator/src/softbus_adapter_standard.cpp index ee6ebcb3ae91e61825c50f7e46be598bdc34fbbc..d5ba5a3d5f8fc7cbf85b4104ed0e704cb07eee2a 100644 --- a/services/distributeddataservice/adapter/communicator/src/softbus_adapter_standard.cpp +++ b/services/distributeddataservice/adapter/communicator/src/softbus_adapter_standard.cpp @@ -583,7 +583,7 @@ bool SoftBusAdapter::IsSameStartedOnPeer(const struct PipeInfo &pipeInfo, void SoftBusAdapter::SetMessageTransFlag(const PipeInfo &pipeInfo, bool flag) { - ZLOGI("pipeInfo: %s flag: %d", pipeInfo.pipeId.c_str(), static_cast(flag)); + ZLOGI("pipeInfo: %s flag: %d", pipeInfo.pipeId.c_str(), flag); flag_ = flag; } diff --git a/services/distributeddataservice/app/src/kvstore_app_accessor.cpp b/services/distributeddataservice/app/src/kvstore_app_accessor.cpp index 27d8637c75702647c5791a339e75418365ed8d16..dba7e36b7cc0b729def5b12d1145c722164a6bcb 100644 --- a/services/distributeddataservice/app/src/kvstore_app_accessor.cpp +++ b/services/distributeddataservice/app/src/kvstore_app_accessor.cpp @@ -102,6 +102,7 @@ void KvStoreAppAccessor::EnableKvStoreAutoLaunch() void KvStoreAppAccessor::DisableKvStoreAutoLaunch(const AppAccessorParam ¶m) { + (void) param; } void KvStoreAppAccessor::OnCallback(const std::string &userId, const std::string &appId, const std::string &storeId, diff --git a/services/distributeddataservice/app/src/kvstore_data_service.cpp b/services/distributeddataservice/app/src/kvstore_data_service.cpp index 56d28ebdc7711813dd28e77ea43f6e630535bd74..c99cfe36e6942eab2a776e73cecf13cd505a6334 100644 --- a/services/distributeddataservice/app/src/kvstore_data_service.cpp +++ b/services/distributeddataservice/app/src/kvstore_data_service.cpp @@ -1134,6 +1134,7 @@ KvStoreDataService::KvStoreClientDeathObserverImpl::KvStoreDeathRecipient::~KvSt void KvStoreDataService::KvStoreClientDeathObserverImpl::KvStoreDeathRecipient::OnRemoteDied( const wptr &remote) { + (void) remote; ZLOGI("begin"); kvStoreClientDeathObserverImpl_.NotifyClientDie(); } diff --git a/services/distributeddataservice/app/src/query_helper.cpp b/services/distributeddataservice/app/src/query_helper.cpp index c11c417e93c45b418d7147a2170de8be6f487158..e4cf2bf41955cb130b0dcfc2bf1e9bf4fc34fdd0 100644 --- a/services/distributeddataservice/app/src/query_helper.cpp +++ b/services/distributeddataservice/app/src/query_helper.cpp @@ -15,14 +15,15 @@ #define LOG_TAG "QueryHelper" +#include "query_helper.h" + #include #include -#include + #include "kvstore_utils.h" #include "data_query.h" #include "log_print.h" #include "types.h" -#include "query_helper.h" namespace OHOS::DistributedKv { constexpr int QUERY_SKIP_SIZE = 1; diff --git a/services/distributeddataservice/app/src/single_kvstore_impl.cpp b/services/distributeddataservice/app/src/single_kvstore_impl.cpp index 3fd7506153f690c87d1ca01f04db33e0b6300cf9..33c121c045086ed0e6ab7324c35ae38f6612a607 100644 --- a/services/distributeddataservice/app/src/single_kvstore_impl.cpp +++ b/services/distributeddataservice/app/src/single_kvstore_impl.cpp @@ -900,7 +900,7 @@ std::vector SingleKvStoreImpl::MapNodeIdToUuids(const std::vector &deviceIds, } DdsTrace trace(std::string(LOG_TAG "Delegate::") + std::string(__FUNCTION__)); status = kvStoreNbDelegate_->SubscribeRemoteQuery(deviceUuids, syncEnd, dbQuery, false); - ZLOGD("end: %d", static_cast(status)); + ZLOGD("end: %u", static_cast(status)); } Reporter::GetInstance()->VisitStatistic()->Report({bundleName_, __FUNCTION__}); return ConvertDbStatus(status); @@ -962,7 +962,7 @@ Status SingleKvStoreImpl::DoUnSubscribe(const std::vector &deviceId } DdsTrace trace(std::string(LOG_TAG "Delegate::") + std::string(__FUNCTION__)); status = kvStoreNbDelegate_->UnSubscribeRemoteQuery(deviceUuids, syncEnd, dbQuery, false); - ZLOGD("end: %d", static_cast(status)); + ZLOGD("end: %u", static_cast(status)); } return ConvertDbStatus(status); } diff --git a/services/distributeddataservice/framework/metadata/meta_data.cpp b/services/distributeddataservice/framework/metadata/meta_data.cpp index e1ba68e122d63d155ed935db69bcf44ca43971d5..cf5da85ba67be8d75cca98dd355b293e91eb07a3 100644 --- a/services/distributeddataservice/framework/metadata/meta_data.cpp +++ b/services/distributeddataservice/framework/metadata/meta_data.cpp @@ -23,6 +23,7 @@ bool MetaData::Marshal(json &node) const SetValue(node[GET_NAME(secretKeyMetaData)], secretKeyMetaData); return true; } + bool MetaData::Unmarshal(const json &node) { GetValue(node, GET_NAME(kvStoreType), kvStoreType);