From 515b169a1b32c42eee2ddadee04ebc361303e0ee Mon Sep 17 00:00:00 2001 From: Florian Franzmann Date: Sat, 5 Sep 2020 16:56:04 +0200 Subject: [PATCH] Cleanup: Cast explicitly where integers of different sign are compared --- flash-ota.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flash-ota.c b/flash-ota.c index 3963b4f..94e9372 100644 --- a/flash-ota.c +++ b/flash-ota.c @@ -201,7 +201,7 @@ static int parse_culfw(uint8_t *buf, int buf_len, void *data) rpos++; } - if (hmid && (SRC(rdata->message) != hmid)) + if (hmid && (SRC(rdata->message) != (int)hmid)) return 0; rdata->message_type = MESSAGE_TYPE_E; @@ -1094,7 +1094,7 @@ int main(int argc, char **argv) if (serial && !strncmp((char*)&(rdata.message[0x0b]), serial, 10)) { hmid = SRC(rdata.message); break; - } else if (!serial && SRC(rdata.message) == hmid) { + } else if (!serial && SRC(rdata.message) == (int)hmid) { serial = (char*)&(rdata.message[0x0b]); break; } -- 2.39.5