diff --git a/test/common/threadpool/thread_pool_test.cpp b/test/common/threadpool/thread_pool_test.cpp index b6aa4e5f3ae42603470da4069f7ea519713378b8..3a7b7ef56a0219cb8e0f5a2bd403fd7cdb17bc27 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 133ee21c7b17f27308900140ff0d128cfa4706c8..8d0e6de8d3e31d3fee0f20da81476127f6d8a21b 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;