Skip to content

Commit

Permalink
Fix to compiler error on Mac (#221)
Browse files Browse the repository at this point in the history
  • Loading branch information
greensky00 authored Jun 5, 2021
1 parent 6f23733 commit 714db11
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion include/libnuraft/raft_server.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ class rpc_client;
class req_msg;
class resp_msg;
class rpc_exception;
class snapshot_sync_ctx;
class state_machine;
class state_mgr;
struct context;
struct raft_params;
struct snapshot_sync_ctx;
class raft_server : public std::enable_shared_from_this<raft_server> {
friend class nuraft_global_mgr;
public:
Expand Down
2 changes: 1 addition & 1 deletion src/handle_client_request.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ ptr<resp_msg> raft_server::handle_cli_req(req_msg& req) {
if (entry != commit_ret_elems_.end()) {
// Commit thread was faster than this.
elem = entry->second;
p_tr("commit thread was faster than this thread: %p", elem);
p_tr("commit thread was faster than this thread: %p", elem.get());
} else {
commit_ret_elems_.insert( std::make_pair(last_idx, elem) );
}
Expand Down
2 changes: 1 addition & 1 deletion src/handle_commit.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ void raft_server::commit_app_log(ulong idx_to_commit,
elem->result_code_ = cmd_result_code::OK;
elem->ret_value_ = ret_value;
p_tr("commit thread is invoked earlier than user thread, "
"log %lu, elem %p", sm_idx, elem);
"log %lu, elem %p", sm_idx, elem.get());

switch (ctx_->get_params()->return_method_) {
case raft_params::blocking:
Expand Down

0 comments on commit 714db11

Please sign in to comment.