From 1d4447645d30385aeca0b5a0b52a7a70e4df7df9 Mon Sep 17 00:00:00 2001 From: Leonard Grey Date: Thu, 18 Aug 2022 16:38:57 -0400 Subject: [PATCH] Mac: Fix shadow warning This caused a warning with `-Wshadow` on due to the loop below. Bug: None Change-Id: I63c4252d7ff66c416d8f0edde868a9b0a6aeb65e Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3838745 Reviewed-by: Mark Mentovai Commit-Queue: Leonard Grey --- snapshot/mac/process_reader_mac_test.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/snapshot/mac/process_reader_mac_test.cc b/snapshot/mac/process_reader_mac_test.cc index 9ed36357..db982f93 100644 --- a/snapshot/mac/process_reader_mac_test.cc +++ b/snapshot/mac/process_reader_mac_test.cc @@ -423,10 +423,9 @@ TEST(ProcessReaderMac, SelfSeveralThreads) { ThreadMap thread_map; const uint64_t self_thread_id = PthreadToThreadID(pthread_self()); TestThreadPool::ThreadExpectation expectation; - pthread_t thread = pthread_self(); - expectation.stack_base = - FromPointerCast(pthread_get_stackaddr_np(thread)); - expectation.stack_size = pthread_get_stacksize_np(thread); + expectation.stack_base = FromPointerCast( + pthread_get_stackaddr_np(pthread_self())); + expectation.stack_size = pthread_get_stacksize_np(pthread_self()); expectation.suspend_count = 0; thread_map[self_thread_id] = expectation; for (size_t thread_index = 0; thread_index < kChildThreads; ++thread_index) {