From f4c8e057080419cc9c845cfb7df95d7c9b2193c4 Mon Sep 17 00:00:00 2001 From: Zexi Liu Date: Sun, 21 Jul 2024 17:58:17 -0700 Subject: [PATCH] =?UTF-8?q?Matching=20format=20specifies=20type=20to=20arg?= =?UTF-8?q?ument=20type=20to=20eliminate=20compile=20=E2=80=A6=20(#521)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Matching format specifies type to argument type to eliminate compile warnings * Apply comments * Fix another place --------- Co-authored-by: Zexi Liu --- src/raft_server.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/raft_server.cxx b/src/raft_server.cxx index 7fd00a37..c6a8c56a 100644 --- a/src/raft_server.cxx +++ b/src/raft_server.cxx @@ -1189,7 +1189,7 @@ void raft_server::check_leadership_transfer() { if (peer_elem->get_matched_idx() + params->stale_log_gap_ < cur_commit_idx) { // This peer is lagging behind. - p_tr("peer %d is lagging behind, %lu < %lu", + p_tr("peer %d is lagging behind, %" PRIu64 " < %" PRIu64, s_conf.get_id(), peer_elem->get_matched_idx(), cur_commit_idx); return; @@ -1198,7 +1198,7 @@ void raft_server::check_leadership_transfer() { uint64_t last_resp_ms = peer_elem->get_resp_timer_us() / 1000; if (last_resp_ms > election_lower) { // This replica is not responding. - p_tr("peer %d is not responding, %lu ms ago", + p_tr("peer %d is not responding, %" PRIu64 " ms ago", s_conf.get_id(), last_resp_ms); return; }