diff --git a/client/cmdhfepa.c b/client/cmdhfepa.c index d9413cf3e..6588c393b 100644 --- a/client/cmdhfepa.c +++ b/client/cmdhfepa.c @@ -31,13 +31,13 @@ int CmdHFEPACollectPACENonces(const char *Cmd) // delay between requests unsigned int d = 0; - sscanf(Cmd, "%hhu %u %u", &m, &n, &d); + sscanf(Cmd, "%"hhu" %u %u", &m, &n, &d); // values are expected to be > 0 m = m > 0 ? m : 1; n = n > 0 ? n : 1; - PrintAndLog("Collecting %u %hhu-byte nonces", n, m); + PrintAndLog("Collecting %u %"hhu"-byte nonces", n, m); PrintAndLog("Start: %u", time(NULL)); // repeat n times for (unsigned int i = 0; i < n; i++) { diff --git a/client/cmdhflegic.c b/client/cmdhflegic.c index 2719029a3..ebc75f796 100644 --- a/client/cmdhflegic.c +++ b/client/cmdhflegic.c @@ -324,7 +324,7 @@ int CmdLegicRfSim(const char *Cmd) c.arg[0] = 6; c.arg[1] = 3; c.arg[2] = 0; - sscanf(Cmd, " %lli %lli %lli", &c.arg[0], &c.arg[1], &c.arg[2]); + sscanf(Cmd, " %"lli" %"lli" %"lli, &c.arg[0], &c.arg[1], &c.arg[2]); SendCommand(&c); return 0; } @@ -344,7 +344,7 @@ int CmdLegicRfWrite(const char *Cmd) int CmdLegicRfFill(const char *Cmd) { UsbCommand cmd ={CMD_WRITER_LEGIC_RF}; - int res = sscanf(Cmd, " 0x%llx 0x%llx 0x%llx", &cmd.arg[0], &cmd.arg[1], &cmd.arg[2]); + int res = sscanf(Cmd, " 0x%"llx" 0x%"llx" 0x%"llx, &cmd.arg[0], &cmd.arg[1], &cmd.arg[2]); if(res != 3) { PrintAndLog("Please specify the offset, length and value as two hex strings"); return -1; diff --git a/client/cmdlf.c b/client/cmdlf.c index dd6281cd7..271dcb783 100644 --- a/client/cmdlf.c +++ b/client/cmdlf.c @@ -38,7 +38,7 @@ int CmdLFCommandRead(const char *Cmd) dummy[0]= ' '; UsbCommand c = {CMD_MOD_THEN_ACQUIRE_RAW_ADC_SAMPLES_125K}; - sscanf(Cmd, "%lli %lli %lli %s %s", &c.arg[0], &c.arg[1], &c.arg[2], (char *) &c.d.asBytes,(char *) &dummy+1); + sscanf(Cmd, "%"lli" %"lli" %"lli" %s %s", &c.arg[0], &c.arg[1], &c.arg[2],(char*)(&c.d.asBytes),(char*)(&dummy+1)); // in case they specified 'h' strcpy((char *)&c.d.asBytes + strlen((char *)c.d.asBytes), dummy); SendCommand(&c); diff --git a/client/proxmark3.h b/client/proxmark3.h index 0bf5a9ebf..eebaa4951 100644 --- a/client/proxmark3.h +++ b/client/proxmark3.h @@ -15,6 +15,8 @@ #define __STDC_FORMAT_MACROS #include #define llx PRIx64 +#define lli PRIi64 +#define hhu PRIu8 #include #include "usb_cmd.h"