From c1bc9f75f66fbe2fbe73a2a1da5496a6e3a68fac Mon Sep 17 00:00:00 2001 From: Yann GASCUEL <34003959+lnv42@users.noreply.github.com> Date: Wed, 24 Jan 2024 15:47:39 +0100 Subject: [PATCH] iso15sim: fix type issue to make CodeQL happy --- armsrc/iso15693.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/armsrc/iso15693.c b/armsrc/iso15693.c index ae1274cd4..7e2302725 100644 --- a/armsrc/iso15693.c +++ b/armsrc/iso15693.c @@ -2296,7 +2296,7 @@ void SimTagIso15693(uint8_t *uid, uint8_t block_size) { maskCpt = 0; - while (mask_len >= 8 && cmdCpt < cmd_len && maskCpt < 8) { // Byte comparison + while (mask_len >= 8 && cmdCpt < (uint8_t)cmd_len && maskCpt < 8) { // Byte comparison if (cmd[cmdCpt++] != tag->uid[maskCpt++]) { error++; // mask don't match : drop request break; @@ -2420,7 +2420,7 @@ void SimTagIso15693(uint8_t *uid, uint8_t block_size) { else { recv[0] = ISO15_NOERROR; recvLen = 1; - for (uint16_t i = 0 ; i < (nbPages + 1) * tag->bytesPerPage && \ + for (int i = 0 ; i < (nbPages + 1) * tag->bytesPerPage && \ recvLen + 3 < ISO15693_MAX_RESPONSE_LENGTH ; i++) { if ((i % tag->bytesPerPage) == 0 && (cmd[0] & ISO15_REQ_OPTION)) recv[recvLen++] = tag->locks[pageNum + (i / tag->bytesPerPage)];