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

chore: fix some warnings on clang 16.0.0 #308

Merged
merged 1 commit into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
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
8 changes: 4 additions & 4 deletions tests/unit/rpc/tcp_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,14 +175,14 @@ TEST(tcp_rpc_test, async_echo_test) {
server.register_handler_callback(
[](request req,
std::function<void(std::optional<response>)> cb) -> bool {
std::thread([cb = std::move(cb), r = req]() {
std::thread([cb_inner = std::move(cb), r = req]() {
auto resp = response{};
std::visit(
[&](auto val) {
resp = val;
},
r);
cb(resp);
cb_inner(resp);
}).detach();
return true;
});
Expand Down Expand Up @@ -229,8 +229,8 @@ TEST(tcp_rpc_test, async_error_test) {
[](request req,
std::function<void(std::optional<response>)> cb) -> bool {
if(req) {
std::thread([cb = std::move(cb)]() {
cb(std::nullopt);
std::thread([cb_inner = std::move(cb)]() {
cb_inner(std::nullopt);
}).detach();
}
return req;
Expand Down
2 changes: 1 addition & 1 deletion tools/bench/twophase_gen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ auto main(int argc, char** argv) -> int {
.count();

auto res_cb
= [&, txn = tx.value(), send_time = send_time](
= [&, txn = tx.value(), send_time](
cbdc::sentinel::rpc::client::execute_result_type res) {
auto tx_id = cbdc::transaction::tx_id(txn);
if(!res.has_value()) {
Expand Down
Loading