Skip to content

Commit

Permalink
chore: fix some warnings on clang 16.0.0
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Maurer <[email protected]>
  • Loading branch information
maurermi authored and HalosGhost committed Nov 14, 2024
1 parent 6b399e1 commit 96062b5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
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

0 comments on commit 96062b5

Please sign in to comment.