chore: Enable most clang-tidy bugprone checks (#6929)

Co-authored-by: Ayaz Salikhov <mathbunnyru@users.noreply.github.com>
This commit is contained in:
Alex Kremer
2026-04-14 21:24:21 +01:00
committed by GitHub
parent 2f029a2120
commit 6a0ce46755
38 changed files with 120 additions and 105 deletions

View File

@@ -265,7 +265,7 @@ inline Scheduler::queue_type::~queue_type()
auto e = &*iter;
++iter;
e->~event();
alloc_->deallocate(e, sizeof(e));
alloc_->deallocate(e, sizeof(e)); // NOLINT(bugprone-sizeof-expression)
}
}

View File

@@ -452,7 +452,7 @@ private:
bool ssl;
lambda(int id_, TrustedPublisherServer& self_, socket_type&& sock_, bool ssl_)
: id(id_), self(self_), sock(std::move(sock_)), work(sock_.get_executor()), ssl(ssl_)
: id(id_), self(self_), sock(std::move(sock_)), work(sock.get_executor()), ssl(ssl_)
{
}

View File

@@ -75,9 +75,10 @@ public:
return hotTRANSACTION_NODE;
case 3:
return hotUNKNOWN;
default:
// will never happen, but make static analysis tool happy.
return hotUNKNOWN;
}
// will never happen, but make static analysis tool happy.
return hotUNKNOWN;
}();
uint256 hash;

View File

@@ -211,7 +211,7 @@ public:
parallel_for(std::size_t const n, std::size_t number_of_threads, Args const&... args)
{
std::atomic<std::size_t> c(0);
std::vector<beast::unit_test::thread> t;
std::vector<beast::unit_test::Thread> t;
t.reserve(number_of_threads);
for (std::size_t id = 0; id < number_of_threads; ++id)
t.emplace_back(*this, parallel_for_lambda<Body>(n, c), args...);
@@ -224,7 +224,7 @@ public:
parallel_for_id(std::size_t const n, std::size_t number_of_threads, Args const&... args)
{
std::atomic<std::size_t> c(0);
std::vector<beast::unit_test::thread> t;
std::vector<beast::unit_test::Thread> t;
t.reserve(number_of_threads);
for (std::size_t id = 0; id < number_of_threads; ++id)
t.emplace_back(*this, parallel_for_lambda<Body>(n, c), id, args...);