diff --git a/frameworks/ans/src/notification.cpp b/frameworks/ans/src/notification.cpp index 7723258b80e2da49c025bb80cfe43d1747543a60..352c4cc17fb9beb75043939ea3e7a380d70d3b64 100644 --- a/frameworks/ans/src/notification.cpp +++ b/frameworks/ans/src/notification.cpp @@ -465,7 +465,7 @@ void Notification::SetRemindType(const NotificationConstant::RemindType &reminTy std::string Notification::GenerateNotificationKey( const std::string &deviceId, int32_t userId, int32_t uid, const std::string &label, int32_t id) { - const char *KEY_SPLITER = "_"; + const char *keySpliter = "_"; std::stringstream stream; stream << deviceId << KEY_SPLITER << userId << KEY_SPLITER << uid << KEY_SPLITER << label << KEY_SPLITER << id; diff --git a/frameworks/test/moduletest/ans_innerkits_module_publish_test.cpp b/frameworks/test/moduletest/ans_innerkits_module_publish_test.cpp index a9e2e45a417e28184eb28776f3cb825414c77042..22de02b1b9f0035a49b65645b872d0bebd488901 100644 --- a/frameworks/test/moduletest/ans_innerkits_module_publish_test.cpp +++ b/frameworks/test/moduletest/ans_innerkits_module_publish_test.cpp @@ -74,40 +74,40 @@ const std::string CLASSIFICATION_ALARM {"alarm"}; class TestAnsSubscriber : public NotificationSubscriber { public: - virtual void OnConnected() override + void OnConnected() override { g_subscribe_mtx.unlock(); } - virtual void OnDisconnected() override + void OnDisconnected() override { g_unsubscribe_mtx.unlock(); } - virtual void OnDied() override + void OnDied() override {} - virtual void OnUpdate(const std::shared_ptr &sortingMap) override + void OnUpdate(const std::shared_ptr &sortingMap) override {} - virtual void OnDoNotDisturbDateChange(const std::shared_ptr &date) override + void OnDoNotDisturbDateChange(const std::shared_ptr &date) override {} - virtual void OnEnabledNotificationChanged( + void OnEnabledNotificationChanged( const std::shared_ptr &callbackData) override {} - virtual void OnCanceled(const std::shared_ptr &request) override + void OnCanceled(const std::shared_ptr &request) override { GTEST_LOG_(INFO) << "ANS_Interface_MT::OnCanceled request : " << request->GetNotificationRequest().Dump(); OnCanceledReceived = true; } - virtual void OnCanceled(const std::shared_ptr &request, + void OnCanceled(const std::shared_ptr &request, const std::shared_ptr &sortingMap, int deleteReason) override {} - virtual void OnConsumed(const std::shared_ptr &request) override + void OnConsumed(const std::shared_ptr &request) override { OnConsumedReceived = true; g_consumed_mtx.unlock(); @@ -153,7 +153,7 @@ public: } } - virtual void OnConsumed(const std::shared_ptr &request, + void OnConsumed(const std::shared_ptr &request, const std::shared_ptr &sortingMap) override {} diff --git a/test/bechmarktest/notification_publish_test/notification_publish_test.cpp b/test/bechmarktest/notification_publish_test/notification_publish_test.cpp index 02a3485802b9500d78cb49dd9c9036aee0ea3bc0..61b59db636618ffac90e3dd6bce0339b1b8fa9e0 100644 --- a/test/bechmarktest/notification_publish_test/notification_publish_test.cpp +++ b/test/bechmarktest/notification_publish_test/notification_publish_test.cpp @@ -42,7 +42,7 @@ public: InitButtonRequest(); } - virtual ~BenchmarkNotificationPublish() override = default; + ~BenchmarkNotificationPublish() override = default; void SetUp(const ::benchmark::State &state) override {} diff --git a/test/bechmarktest/notification_services_test/notification_service_test.cpp b/test/bechmarktest/notification_services_test/notification_service_test.cpp index 0f3c6001e324bcee632c4f202044640441d77bef..25c853c360fd2d766ef1cac7cc661c40504a2078 100644 --- a/test/bechmarktest/notification_services_test/notification_service_test.cpp +++ b/test/bechmarktest/notification_services_test/notification_service_test.cpp @@ -68,7 +68,7 @@ public: ReportAggregatesOnly(); } - virtual ~BenchmarkNotificationService() override = default; + ~BenchmarkNotificationService() override = default; void SetUp(const ::benchmark::State &state) override {} diff --git a/tools/dump/src/notification_shell_command.cpp b/tools/dump/src/notification_shell_command.cpp index b135c15c56abef6440147c5450d36c4b2720a359..0906e4684375359167dbf75cd086f383e234fccb 100644 --- a/tools/dump/src/notification_shell_command.cpp +++ b/tools/dump/src/notification_shell_command.cpp @@ -305,7 +305,6 @@ ErrCode NotificationShellCommand::RunSetEnableCmd() resultReceiver_.append("set notification enabled failed\n"); } return ret; - } } // namespace Notification } // namespace OHOS