From e29981e10c71b57bc987895a2cfec892b1aac750 Mon Sep 17 00:00:00 2001 From: Peter Kasting Date: Tue, 5 Oct 2021 10:31:59 -0700 Subject: [PATCH] Fix an instance of -Wunused-but-set-variable. Bug: chromium:794619 Change-Id: I4db52a6d895535b79e75331c51017489f490b4c1 Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3206094 Reviewed-by: Mark Mentovai Commit-Queue: Peter Kasting --- .../ios_handler/in_process_intermediate_dump_handler.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/client/ios_handler/in_process_intermediate_dump_handler.cc b/client/ios_handler/in_process_intermediate_dump_handler.cc index 9c1a3164..7e04058a 100644 --- a/client/ios_handler/in_process_intermediate_dump_handler.cc +++ b/client/ios_handler/in_process_intermediate_dump_handler.cc @@ -747,7 +747,9 @@ void InProcessIntermediateDumpHandler::WriteThreadInfo( writer, IntermediateDumpKey::kThreads); // Exception thread ID. +#if defined(ARCH_CPU_ARM64) uint64_t exception_thread_id = 0; +#endif thread_identifier_info identifier_info; mach_msg_type_number_t count = THREAD_IDENTIFIER_INFO_COUNT; kern_return_t kr = @@ -756,7 +758,9 @@ void InProcessIntermediateDumpHandler::WriteThreadInfo( reinterpret_cast(&identifier_info), &count); if (kr == KERN_SUCCESS) { +#if defined(ARCH_CPU_ARM64) exception_thread_id = identifier_info.thread_id; +#endif } else { CRASHPAD_RAW_LOG_ERROR(kr, "thread_info::THREAD_IDENTIFIER_INFO"); } @@ -803,7 +807,9 @@ void InProcessIntermediateDumpHandler::WriteThreadInfo( } // Thread ID. +#if defined(ARCH_CPU_ARM64) uint64_t thread_id; +#endif thread_identifier_info identifier_info; count = THREAD_IDENTIFIER_INFO_COUNT; kr = thread_info(thread, @@ -811,7 +817,9 @@ void InProcessIntermediateDumpHandler::WriteThreadInfo( reinterpret_cast(&identifier_info), &count); if (kr == KERN_SUCCESS) { +#if defined(ARCH_CPU_ARM64) thread_id = identifier_info.thread_id; +#endif WriteProperty( writer, IntermediateDumpKey::kThreadID, &identifier_info.thread_id); WriteProperty(writer,