Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix clang-tidy error: clang-analyzer-cplusplus.NewDelete #1539

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions asio/include/asio/detail/impl/win_thread.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ void win_thread::start_thread(func_base* arg, unsigned int stack_size)
asio::detail::throw_error(ec, "thread.entry_event");
}

// NOLINTNEXTLINE(clang-analyzer-cplusplus.NewDelete)
arg->exit_event_ = exit_event_ = ::CreateEventW(0, true, false, 0);
if (!exit_event_)
{
Expand All @@ -86,6 +87,7 @@ void win_thread::start_thread(func_base* arg, unsigned int stack_size)
}

unsigned int thread_id = 0;
// NOLINTNEXTLINE(clang-analyzer-cplusplus.NewDelete)
thread_ = reinterpret_cast<HANDLE>(::_beginthreadex(0,
stack_size, win_thread_function, arg, 0, &thread_id));
if (!thread_)
Expand Down