GCC: fix invalid bind of packed field to uint32_t&

GCC does not allow binding a packed field to an address. Assign
to a intermediate variable instead before pushing to map.

Bug: chromium:819294
Change-Id: I806e5f99c2b19e656b91a60f72172b59c961ba5f
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3751392
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
This commit is contained in:
Stephan Hartmann 2022-07-08 19:24:46 +02:00 committed by Crashpad LUCI CQ
parent 80520bd937
commit 7a622b2f6b

View File

@ -643,7 +643,9 @@ bool ProcessSnapshotMinidump::InitializeThreadNames() {
return false; return false;
} }
thread_names_.emplace(minidump_thread_name.ThreadId, std::move(name)); // See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36566
const uint32_t thread_id = minidump_thread_name.ThreadId;
thread_names_.emplace(thread_id, std::move(name));
} }
return true; return true;