From 67f8c6ab41bd3b5c7d96b2a9cedb9d45fea7c1f3 Mon Sep 17 00:00:00 2001 From: Moritz Ulmer Date: Mon, 18 Aug 2025 11:16:13 +0200 Subject: [PATCH] Resolve sign comparison warning Why: - Reduce unnecessary warnings This change addresses the need by: - Using unsigned integers for comparisons --- src/improv.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/improv.cpp b/src/improv.cpp index 8a540e9..0ccc8ee 100644 --- a/src/improv.cpp +++ b/src/improv.cpp @@ -81,10 +81,10 @@ bool parse_improv_serial_byte(size_t position, uint8_t byte, const uint8_t *buff uint8_t type = buffer[7]; uint8_t data_len = buffer[8]; - if (position <= 8 + data_len) + if (position <= 8u + data_len) return true; - if (position == 8 + data_len + 1) { + if (position == 8u + data_len + 1) { uint8_t checksum = 0x00; for (size_t i = 0; i < position; i++) checksum += buffer[i]; @@ -109,7 +109,7 @@ std::vector build_rpc_response(Command command, const std::vector build_rpc_response(Command command, const std::vector