diff --git a/client/cmdhfepa.c b/client/cmdhfepa.c index 1b6ec4d6a..af5d26eaf 100644 --- a/client/cmdhfepa.c +++ b/client/cmdhfepa.c @@ -50,7 +50,7 @@ static int CmdHFEPACollectPACENonces(const char *Cmd) { // check if command failed if (resp.oldarg[0] != 0) { - PrintAndLogEx(FAILED, "Error in step %" PRId64 ", Return code: %" PRId64, resp.oldarg[0], (int)resp.oldarg[1]); + PrintAndLogEx(FAILED, "Error in step %" PRId64 ", Return code: %" PRId64, resp.oldarg[0], resp.oldarg[1]); } else { size_t nonce_length = resp.oldarg[1]; char *nonce = (char *) calloc(2 * nonce_length + 1, sizeof(uint8_t)); diff --git a/client/cmdhffelica.c b/client/cmdhffelica.c index 0948bcf82..333498f37 100644 --- a/client/cmdhffelica.c +++ b/client/cmdhffelica.c @@ -408,7 +408,7 @@ static int CmdHFFelicaDumpLite(const char *Cmd) { return 0; } - PrintAndLogEx(SUCCESS, "Recorded Activity (trace len = %"PRIu64" bytes)", tracelen); + PrintAndLogEx(SUCCESS, "Recorded Activity (trace len = %"PRIu32" bytes)", tracelen); print_hex_break(trace, tracelen, 32); printSep(); diff --git a/client/cmdhficlass.c b/client/cmdhficlass.c index e2ecf943c..028e04a4c 100644 --- a/client/cmdhficlass.c +++ b/client/cmdhficlass.c @@ -2487,7 +2487,7 @@ static int CmdHFiClassLookUp(const char *Cmd) { case 'u': param_gethex_ex(Cmd, cmdp + 1, CSN, &len); if (len >> 1 != sizeof(CSN)) { - PrintAndLogEx(WARNING, "Wrong CSN length, expected %d got [%d]", sizeof(CSN), len >> 1); + PrintAndLogEx(WARNING, "Wrong CSN length, expected %zu got [%d]", sizeof(CSN), len >> 1); errors = true; } cmdp += 2; @@ -2495,7 +2495,7 @@ static int CmdHFiClassLookUp(const char *Cmd) { case 'm': param_gethex_ex(Cmd, cmdp + 1, MACS, &len); if (len >> 1 != sizeof(MACS)) { - PrintAndLogEx(WARNING, "Wrong MACS length, expected %d got [%d] ", sizeof(MACS), len >> 1); + PrintAndLogEx(WARNING, "Wrong MACS length, expected %zu got [%d] ", sizeof(MACS), len >> 1); errors = true; } else { memcpy(MAC_TAG, MACS + 4, 4); diff --git a/client/cmdlfem4x.c b/client/cmdlfem4x.c index 2bfb25eaa..e1e9c75d8 100644 --- a/client/cmdlfem4x.c +++ b/client/cmdlfem4x.c @@ -401,7 +401,7 @@ int AskEm410xDecode(bool verbose, uint32_t *hi, uint64_t *lo) { else if (ans == -4) PrintAndLogEx(DEBUG, "DEBUG: Error - Em410x preamble not found"); else if (ans == -5) - PrintAndLogEx(DEBUG, "DEBUG: Error - Em410x Size not correct: %d", size); + PrintAndLogEx(DEBUG, "DEBUG: Error - Em410x Size not correct: %zu", size); else if (ans == -6) PrintAndLogEx(DEBUG, "DEBUG: Error - Em410x parity failed"); @@ -692,7 +692,7 @@ static int CmdEM410xWrite(const char *Cmd) { // the clock rate in bits 8-15 of the card value card = (card & 0xFF) | ((clock1 << 8) & 0xFF00); } else if (card == 0) { - PrintAndLogEx(SUCCESS, "Writing %s tag with UID 0x%010" PRIx64, "(clock rate: %d)", "T5555", id, clock1); + PrintAndLogEx(SUCCESS, "Writing %s tag with UID 0x%010" PRIx64 "(clock rate: %d)", "T5555", id, clock1); card = (card & 0xFF) | ((clock1 << 8) & 0xFF00); } else { PrintAndLogEx(FAILED, "Error! Bad card type selected.\n"); diff --git a/client/cmdlffdx.c b/client/cmdlffdx.c index f1f3d6100..dc2a11478 100644 --- a/client/cmdlffdx.c +++ b/client/cmdlffdx.c @@ -216,7 +216,7 @@ static int CmdFdxDemod(const char *Cmd) { // remove marker bits (1's every 9th digit after preamble) (pType = 2) size = removeParity(DemodBuffer, 11, 9, 2, 117); if (size != 104) { - PrintAndLogEx(DEBUG, "DEBUG: Error - FDX-B error removeParity: %d", size); + PrintAndLogEx(DEBUG, "DEBUG: Error - FDX-B error removeParity: %zu", size); return PM3_ESOFT; } diff --git a/client/cmdusart.c b/client/cmdusart.c index 8e8899dc8..8e095f41e 100644 --- a/client/cmdusart.c +++ b/client/cmdusart.c @@ -373,7 +373,7 @@ static int CmdUsartBtFactory(const char *Cmd) { if (strcmp((char *)data, "OKsetname") == 0) { PrintAndLogEx(SUCCESS, "Name set to " _GREEN_("PM3_RDV4.0")); } else { - PrintAndLogEx(WARNING, "Unexpected response to AT+NAME: " _YELLOW_("%.*s"), len, data); + PrintAndLogEx(WARNING, "Unexpected response to AT+NAME: " _YELLOW_("%.*s"), (int)len, data); } } else { PrintAndLogEx(WARNING, "Lost contact with add-on, please try again"); @@ -409,7 +409,7 @@ static int CmdUsartBtFactory(const char *Cmd) { if (strcmp((char *)data, "OKsetPIN") == 0) { PrintAndLogEx(SUCCESS, "PIN set to " _GREEN_("1234")); } else { - PrintAndLogEx(WARNING, "Unexpected response to AT+PIN: " _YELLOW_("%.*s"), len, data); + PrintAndLogEx(WARNING, "Unexpected response to AT+PIN: " _YELLOW_("%.*s"), (int)len, data); } } else { PrintAndLogEx(WARNING, "Lost contact with add-on, please try again"); @@ -429,7 +429,7 @@ static int CmdUsartBtFactory(const char *Cmd) { if (strcmp((char *)data, "OK None") == 0) { PrintAndLogEx(SUCCESS, "Parity set to " _GREEN_("None")); } else { - PrintAndLogEx(WARNING, "Unexpected response to AT+P: " _YELLOW_("%.*s"), len, data); + PrintAndLogEx(WARNING, "Unexpected response to AT+P: " _YELLOW_("%.*s"), (int)len, data); } } else { PrintAndLogEx(WARNING, "Lost contact with add-on, please try again"); @@ -449,7 +449,7 @@ static int CmdUsartBtFactory(const char *Cmd) { if (strcmp((char *)data, "OK" BTADDON_BAUD_NUM) == 0) { PrintAndLogEx(SUCCESS, "Baudrate set to " _GREEN_(BTADDON_BAUD_NUM)); } else { - PrintAndLogEx(WARNING, "Unexpected response to AT+BAUD: " _YELLOW_("%.*s"), len, data); + PrintAndLogEx(WARNING, "Unexpected response to AT+BAUD: " _YELLOW_("%.*s"), (int)len, data); } } else { PrintAndLogEx(WARNING, "Lost contact with add-on, please try again"); diff --git a/client/mifare/ndef.c b/client/mifare/ndef.c index 946b80b04..392a550af 100644 --- a/client/mifare/ndef.c +++ b/client/mifare/ndef.c @@ -211,7 +211,7 @@ static int ndefDecodeSig(uint8_t *sig, size_t siglen) { if ((indx <= siglen) && certURI) { size_t inturilen = (sig[indx] << 8) + sig[indx + 1]; indx += 2; - PrintAndLogEx(NORMAL, "\tcertificate uri [%zu]: %.*s", inturilen, inturilen, &sig[indx]); + PrintAndLogEx(NORMAL, "\tcertificate uri [%zu]: %.*s", inturilen, (int)inturilen, &sig[indx]); } return 0;