Skip to content

Commit

Permalink
fix for compiler error ISSUE#371
Browse files Browse the repository at this point in the history
fix for compiler error:
"MFRC522Extended.cpp:824: warning: ordered comparison of pointer with integer zero [-Wextra]
  if (backData && (backLen > 0)) {"
  • Loading branch information
loty2019 authored Sep 28, 2024
1 parent d5dba13 commit 5deedf0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/MFRC522Extended.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -821,7 +821,7 @@ MFRC522::StatusCode MFRC522Extended::TCL_Transceive(TagInfo *tag, byte *sendData
// Swap block number on success
tag->blockNumber = !tag->blockNumber;

if (backData && (backLen > 0)) {
if (backData && (int(backLen) > 0)) {
if (*backLen < in.inf.size)
return STATUS_NO_ROOM;

Expand All @@ -844,7 +844,7 @@ MFRC522::StatusCode MFRC522Extended::TCL_Transceive(TagInfo *tag, byte *sendData
if (result != STATUS_OK)
return result;

if (backData && (backLen > 0)) {
if (backData && (int(backLen) > 0)) {
if ((*backLen + ackDataSize) > totalBackLen)
return STATUS_NO_ROOM;

Expand Down

0 comments on commit 5deedf0

Please sign in to comment.