From dfc2e97d5ea2fa2da218528ddb76fa6f381c4bfa Mon Sep 17 00:00:00 2001 From: Sergey Lyubka Date: Sun, 14 Jan 2024 22:10:14 +0000 Subject: [PATCH] Squash warning --- mongoose.c | 4 ++-- src/tls_builtin.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mongoose.c b/mongoose.c index 7fc6f15c..075e6eb3 100644 --- a/mongoose.c +++ b/mongoose.c @@ -9056,8 +9056,8 @@ static void mg_tls_derive_secret(const char *label, uint8_t *key, size_t keysz, // Did we receive a full TLS message in the c->rtls buffer? static bool mg_tls_got_msg(struct mg_connection *c) { - return c->rtls.len >= TLS_HDR_SIZE && - c->rtls.len >= (TLS_HDR_SIZE + MG_LOAD_BE16(c->rtls.buf + 3)); + return c->rtls.len >= (size_t) TLS_HDR_SIZE && + c->rtls.len >= (size_t) (TLS_HDR_SIZE + MG_LOAD_BE16(c->rtls.buf + 3)); } // Remove a single TLS record from the recv buffer diff --git a/src/tls_builtin.c b/src/tls_builtin.c index 08198a0d..2b7cf6d2 100644 --- a/src/tls_builtin.c +++ b/src/tls_builtin.c @@ -309,8 +309,8 @@ static void mg_tls_derive_secret(const char *label, uint8_t *key, size_t keysz, // Did we receive a full TLS message in the c->rtls buffer? static bool mg_tls_got_msg(struct mg_connection *c) { - return c->rtls.len >= TLS_HDR_SIZE && - c->rtls.len >= (TLS_HDR_SIZE + MG_LOAD_BE16(c->rtls.buf + 3)); + return c->rtls.len >= (size_t) TLS_HDR_SIZE && + c->rtls.len >= (size_t) (TLS_HDR_SIZE + MG_LOAD_BE16(c->rtls.buf + 3)); } // Remove a single TLS record from the recv buffer