diff --git a/Source/Core/Core/MemTools.cpp b/Source/Core/Core/MemTools.cpp index c9109bfd1f..0011fd3bce 100644 --- a/Source/Core/Core/MemTools.cpp +++ b/Source/Core/Core/MemTools.cpp @@ -157,7 +157,6 @@ static void ExceptionThread(mach_port_t port) #pragma pack() memset(&msg_in, 0xee, sizeof(msg_in)); memset(&msg_out, 0xee, sizeof(msg_out)); - mach_msg_header_t* send_msg = nullptr; mach_msg_size_t send_size = 0; mach_msg_option_t option = MACH_RCV_MSG; while (true) @@ -167,7 +166,7 @@ static void ExceptionThread(mach_port_t port) // thread_set_exception_ports, or MACH_NOTIFY_NO_SENDERS due to // mach_port_request_notification. CheckKR("mach_msg_overwrite", - mach_msg_overwrite(send_msg, option, send_size, sizeof(msg_in), port, + mach_msg_overwrite(&msg_out.Head, option, send_size, sizeof(msg_in), port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL, &msg_in.Head, 0)); if (msg_in.Head.msgh_id == MACH_NOTIFY_NO_SENDERS) @@ -216,7 +215,6 @@ static void ExceptionThread(mach_port_t port) msg_out.Head.msgh_size = offsetof(__typeof__(msg_out), new_state) + msg_out.new_stateCnt * sizeof(natural_t); - send_msg = &msg_out.Head; send_size = msg_out.Head.msgh_size; option |= MACH_SEND_MSG; }