diff --git a/test/common/threadpool/thread_pool_test.cpp b/test/common/threadpool/thread_pool_test.cpp index b6aa4e5..3a7b7ef 100755 --- a/test/common/threadpool/thread_pool_test.cpp +++ b/test/common/threadpool/thread_pool_test.cpp @@ -82,8 +82,7 @@ public: const char *GetName() const override { - const char *name = workerName_.c_str(); - return name; + return workerName_.c_str(); } bool OneAction() override diff --git a/test/function/sa_client/sa_client_test.cpp b/test/function/sa_client/sa_client_test.cpp index 133ee21..8d0e6de 100644 --- a/test/function/sa_client/sa_client_test.cpp +++ b/test/function/sa_client/sa_client_test.cpp @@ -26,7 +26,7 @@ using namespace OHOS::AI; using namespace testing::ext; namespace { - const char *INPUT_CHARACTER = "inputData"; + const char * const INPUT_CHARACTER = "inputData"; const char * const CONFIG_DESCRIPTION = "config information"; const long long CLIENT_INFO_VERSION = 1; const int CLIENT_ID = -1;