From d5beefa6bb65211eb7116d6aca0634d9ee15bd3a Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Tue, 30 Jun 2026 00:27:10 +0200 Subject: [PATCH] fix code scanning format warnings --- client/src/cmdhficlass.c | 14 ++++++++++---- client/src/cmdhfmf.c | 7 ++++--- client/src/cmdhfmfp.c | 2 +- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/client/src/cmdhficlass.c b/client/src/cmdhficlass.c index 4078ca143..ce63c2068 100644 --- a/client/src/cmdhficlass.c +++ b/client/src/cmdhficlass.c @@ -1598,8 +1598,11 @@ static int CmdHFiClassTagSim(const char *Cmd) { PrintAndLogEx(INFO, "Starting iCLASS full simulation"); if (bin_len == 0) { PrintAndLogEx(INFO, _GREEN_("Arrow keys") ": "_CYAN_("up/down")" = FC+/- "_CYAN_("right/left")" = CN+/- | " _GREEN_("Enter") " or " _GREEN_("`pm3 button`") " to stop"); - PrintAndLogEx(INFO, "FC: " _YELLOW_("%u") " CN: " _YELLOW_("%u") " CSN: " _YELLOW_("%s"), - card.FacilityCode, card.CardNumber, sprint_hex(csn, 8)); + PrintAndLogEx(INFO, "FC: " _YELLOW_("%u") " CN: " _YELLOW_("%"PRIu64) " CSN: " _YELLOW_("%s"), + card.FacilityCode, + card.CardNumber, + sprint_hex(csn, 8) + ); } else { PrintAndLogEx(INFO, "Press " _GREEN_("`pm3 button`") " to abort"); } @@ -1718,8 +1721,11 @@ static int CmdHFiClassTagSim(const char *Cmd) { } iclass_emul_set_reload_flag(); // signal ARM to reload on next ACTALL - PrintAndLogEx(INFO, "FC: " _YELLOW_("%u") " CN: " _YELLOW_("%u") " CSN: " _YELLOW_("%s"), - card.FacilityCode, card.CardNumber, sprint_hex(csn, 8)); + PrintAndLogEx(INFO, "FC: " _YELLOW_("%u") " CN: " _YELLOW_("%"PRIu64) " CSN: " _YELLOW_("%s"), + card.FacilityCode, + card.CardNumber, + sprint_hex(csn, 8) + ); } tagsim_rawmode_exit(); diff --git a/client/src/cmdhfmf.c b/client/src/cmdhfmf.c index 1c455c7a4..bbe36d391 100644 --- a/client/src/cmdhfmf.c +++ b/client/src/cmdhfmf.c @@ -7256,10 +7256,11 @@ int CmdHFMFNDEFRead(const char *Cmd) { int res = MADCheck(§or0, pmad2, verbose, &haveMAD2); if (res != PM3_SUCCESS) { PrintAndLogEx(ERR, "MAD error %d", res); - if (override) + if (override) { PrintAndLogEx(INFO, "overriding CRC check"); - else + } else { return res; + } } mad_entry_list_t mad_list = {0}; @@ -7282,7 +7283,7 @@ int CmdHFMFNDEFRead(const char *Cmd) { memcpy(&data[datalen], vsector, MFBLOCK_SIZE * 3); datalen += MFBLOCK_SIZE * 3; - PrintAndLogEx(INPLACE, "%d", i); + PrintAndLogEx(INPLACE, "%zu", i); } } PrintAndLogEx(NORMAL, ""); diff --git a/client/src/cmdhfmfp.c b/client/src/cmdhfmfp.c index 2874e4258..cd6126cd4 100644 --- a/client/src/cmdhfmfp.c +++ b/client/src/cmdhfmfp.c @@ -2843,7 +2843,7 @@ int CmdHFMFPNDEFRead(const char *Cmd) { memcpy(&data[datalen], vsector, 16 * 3); datalen += 16 * 3; - PrintAndLogEx(INPLACE, "%d", i); + PrintAndLogEx(INPLACE, "%zu", i); } } PrintAndLogEx(NORMAL, "");