From 02231fd487c588683629cb0ac158550f8c4149b8 Mon Sep 17 00:00:00 2001 From: geeksville Date: Mon, 5 Aug 2024 15:07:43 -0700 Subject: [PATCH] fix minor type comparison warning that I saw in the build (#4398) --- src/mesh/compression/unishox2.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mesh/compression/unishox2.cpp b/src/mesh/compression/unishox2.cpp index fcb12a222..4e239d489 100644 --- a/src/mesh/compression/unishox2.cpp +++ b/src/mesh/compression/unishox2.cpp @@ -1096,7 +1096,7 @@ int decodeRepeat(const char *in, int len, char *out, int olen, int ol, int *bit_ return -1; if (left <= 0) return olen + 1; - if (dist >= strlen(cur_line->data)) + if ((size_t)dist >= strlen(cur_line->data)) return -1; memmove(out + ol, cur_line->data + dist, min_of(left, dict_len)); if (left < dict_len) @@ -1289,7 +1289,7 @@ int unishox2_decompress_lines(const char *in, int len, UNISHOX_API_OUT_AND_LEN(c if (usx_templates[idx] == NULL) break; size_t tlen = strlen(usx_templates[idx]); - if (rem > tlen) + if ((size_t)rem > tlen) break; rem = tlen - rem; int eof = 0;