From 49dbd8899c88134addc4e4cf4632f4a8d699d458 Mon Sep 17 00:00:00 2001 From: wujianlin Date: Sat, 14 Dec 2024 10:26:36 +0800 Subject: [PATCH] Code optimization, do not reuse names in nested scopes Issue:https://gitee.com/openharmony/commonlibrary_c_utils/issues/IBB910?from=project-issue Signed-off-by: wujianlin --- .../common/utils_safe_block_queue_tracking.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/base/test/unittest/common/utils_safe_block_queue_tracking.cpp b/base/test/unittest/common/utils_safe_block_queue_tracking.cpp index 05e35b7..c5e77d8 100644 --- a/base/test/unittest/common/utils_safe_block_queue_tracking.cpp +++ b/base/test/unittest/common/utils_safe_block_queue_tracking.cpp @@ -488,8 +488,8 @@ HWTEST_F(UtilsSafeBlockQueueTracking, testMutilthreadConcurrentGetAndBlockInfull ASSERT_EQ(getedOut, THREAD_NUM); ASSERT_EQ(ungetedOut, static_cast(0)); - for (auto& t : threads) { - t.join(); + for (auto& thd : threads) { + thd.join(); } while (!DemoThreadData::shareQueue.IsEmpty()) { @@ -680,12 +680,12 @@ HWTEST_F(UtilsSafeBlockQueueTracking, testMutilthreadConcurrentGetAndPopInfullqu ASSERT_FALSE(demoDatas[0].joinStatus); demoDatas[0].joinStatus = false; - for (auto& t : threadsout) { - t.join(); + for (auto& thdout : threadsout) { + thdout.join(); } - for (auto& t : threadsin) { - t.join(); + for (auto& thdin : threadsin) { + thdin.join(); } while (!DemoThreadData::shareQueue.IsEmpty()) { -- Gitee