From 82190927de3de493fafcbf59dd9c945ffc806aea Mon Sep 17 00:00:00 2001 From: eugene Date: Tue, 5 Mar 2024 13:15:42 -0500 Subject: [PATCH] cleanup fmt warnings --- library/bind.c | 7 +++++-- library/ziti_ctrl.c | 8 ++++++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/library/bind.c b/library/bind.c index bd3e4770..fb998e43 100644 --- a/library/bind.c +++ b/library/bind.c @@ -14,6 +14,8 @@ #include +#include + #include "ziti/ziti.h" #include "endian_internal.h" #include "win32_compat.h" @@ -162,11 +164,12 @@ static void schedule_rebind(struct ziti_conn *conn, bool now) { uv_random(conn->ziti_ctx->loop, NULL, &random, sizeof(random), 0, NULL); delay = (uint64_t) (random % (backoff * REBIND_DELAY)); conn->server.attempt++; - CONN_LOG(DEBUG, "scheduling re-bind(attempt=%d) in %ld.%lds", conn->server.attempt, delay / 1000, delay % 1000); + CONN_LOG(DEBUG, "scheduling re-bind(attempt=%d) in %" PRIu64 ".%" PRIu64 "s", + conn->server.attempt, delay / 1000, delay % 1000); } else { conn->server.attempt = 0; - CONN_LOG(DEBUG, "scheduling re-bind in %ld.%lds", delay / 1000, delay % 1000); + CONN_LOG(DEBUG, "scheduling re-bind in %" PRIu64 ".%" PRIu64 "s", delay / 1000, delay % 1000); } uv_timer_start(conn->server.timer, rebind_delay_cb, delay, 0); diff --git a/library/ziti_ctrl.c b/library/ziti_ctrl.c index f2fd0f56..89e5f816 100644 --- a/library/ziti_ctrl.c +++ b/library/ziti_ctrl.c @@ -12,7 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include #include + #include "utils.h" #include "zt_internal.h" #include @@ -325,7 +327,8 @@ static void ctrl_body_cb(tlsuv_http_req_t *req, char *b, ssize_t len) { uv_timeval64_t now; uv_gettimeofday(&now); uint64_t elapsed = (now.tv_sec * 1000000 + now.tv_usec) - (resp->start.tv_sec * 1000000 + resp->start.tv_usec); - CTRL_LOG(DEBUG, "completed %s[%s] in %ld.%03ld s", req->method, req->path, elapsed / 1000000, (elapsed / 1000) % 1000); + CTRL_LOG(DEBUG, "completed %s[%s] in %" PRIu64 ".%03" PRIu64 " s", + req->method, req->path, elapsed / 1000000, (elapsed / 1000) % 1000); if (resp->paging) { bool last_page = cr.meta.pagination.total <= cr.meta.pagination.offset + cr.meta.pagination.limit; if (cr.meta.pagination.total > resp->total) { @@ -353,7 +356,8 @@ static void ctrl_body_cb(tlsuv_http_req_t *req, char *b, ssize_t len) { return; } elapsed = (now.tv_sec * 1000000 + now.tv_usec) - (resp->all_start.tv_sec * 1000000 + resp->all_start.tv_usec); - CTRL_LOG(DEBUG, "completed paging request GET[%s] in %ld.%03ld s", resp->base_path, elapsed / 1000000, (elapsed / 1000) % 1000); + CTRL_LOG(DEBUG, "completed paging request GET[%s] in %" PRIu64 ".%03" PRIu64 " s", + resp->base_path, elapsed / 1000000, (elapsed / 1000) % 1000); resp_obj = resp->resp_array; } }