fix cppchecker unsigned warning

This commit is contained in:
iceman1001 2021-05-15 15:33:11 +02:00
commit 8fa51075fb

View file

@ -1852,14 +1852,11 @@ int CmdEM4x05Unlock(const char *Cmd) {
PrintAndLogEx(INFO, "Old protection word => " _YELLOW_("%08X"), search_value); PrintAndLogEx(INFO, "Old protection word => " _YELLOW_("%08X"), search_value);
char bitstring[9] = {0}; char bitstring[9] = {0};
for (int i = 0; i < 8; i++) { for (int i = 0; i < 8; i++) {
bitstring[i] = (bitflips & (0xF << ((7 - i) * 4))) ? 'x' : '.'; bitstring[i] = (bitflips & (0xFU << ((7 - i) * 4))) ? 'x' : '.';
} }
// compute number of bits flipped // compute number of bits flipped
PrintAndLogEx(INFO, "Bitflips: %2u events => %s", bitcount32(bitflips), bitstring); PrintAndLogEx(INFO, "Bitflips: %2u events => %s", bitcount32(bitflips), bitstring);
PrintAndLogEx(INFO, "New protection word => " _CYAN_("%08X") "\n", word14b); PrintAndLogEx(INFO, "New protection word => " _CYAN_("%08X") "\n", word14b);
PrintAndLogEx(INFO, "Try " _YELLOW_("`lf em 4x05_dump`")); PrintAndLogEx(INFO, "Try " _YELLOW_("`lf em 4x05_dump`"));
} }