diff --git a/client/cmdhf.c b/client/cmdhf.c index 7d1fa2668..4c9579f1f 100644 --- a/client/cmdhf.c +++ b/client/cmdhf.c @@ -90,7 +90,7 @@ int CmdHFSearch(const char *Cmd) { int CmdHFTune(const char *Cmd) { (void)Cmd; // Cmd is not used so far PrintAndLogEx(SUCCESS, "Measuring HF antenna, press button to exit"); - UsbCommand c = {CMD_MEASURE_ANTENNA_TUNING_HF}; + UsbCommand c = {CMD_MEASURE_ANTENNA_TUNING_HF, {0, 0, 0}, {{0}}}; clearCommandBuffer(); SendCommand(&c); return 0; diff --git a/client/cmdhffelica.c b/client/cmdhffelica.c index cdbffcf38..7597f6bfe 100644 --- a/client/cmdhffelica.c +++ b/client/cmdhffelica.c @@ -233,7 +233,7 @@ int CmdHFFelicaSimLite(const char *Cmd) { if (!uid) return usage_hf_felica_simlite(); - UsbCommand c = {CMD_FELICA_LITE_SIM, {uid, 0, 0} }; + UsbCommand c = {CMD_FELICA_LITE_SIM, {uid, 0, 0}, {{0}}}; clearCommandBuffer(); SendCommand(&c); return 0; diff --git a/client/cmdhficlass.c b/client/cmdhficlass.c index 000ebf0ca..902f635b2 100644 --- a/client/cmdhficlass.c +++ b/client/cmdhficlass.c @@ -280,7 +280,7 @@ int CmdHFiClassList(const char *Cmd) { int CmdHFiClassSniff(const char *Cmd) { char cmdp = tolower(param_getchar(Cmd, 0)); if (cmdp == 'h') return usage_hf_iclass_sniff(); - UsbCommand c = {CMD_SNIFF_ICLASS}; + UsbCommand c = {CMD_SNIFF_ICLASS, {0, 0, 0}, {{0}}}; SendCommand(&c); return 0; } @@ -380,7 +380,7 @@ int CmdHFiClassSim(const char *Cmd) { PrintAndLogEx(INFO, "Starting iCLASS sim 2 attack (elite mode)"); PrintAndLogEx(INFO, "press keyboard to cancel"); UsbCommand c = {CMD_SIMULATE_TAG_ICLASS, {simType, NUM_CSNS}, {{0}}}; - UsbCommand resp = {0}; + UsbCommand resp; memcpy(c.d.asBytes, csns, 8 * NUM_CSNS); clearCommandBuffer(); SendCommand(&c); @@ -433,7 +433,7 @@ int CmdHFiClassSim(const char *Cmd) { PrintAndLogEx(INFO, "Starting iCLASS sim 4 attack (elite mode, reader in key roll mode)"); PrintAndLogEx(INFO, "press keyboard to cancel"); UsbCommand c = {CMD_SIMULATE_TAG_ICLASS, {simType, NUM_CSNS}, {{0}}}; - UsbCommand resp = {0}; + UsbCommand resp; memcpy(c.d.asBytes, csns, 8 * NUM_CSNS); clearCommandBuffer(); SendCommand(&c); diff --git a/client/cmdhfmfdes.c b/client/cmdhfmfdes.c index 18e4b840a..d967cca39 100644 --- a/client/cmdhfmfdes.c +++ b/client/cmdhfmfdes.c @@ -117,7 +117,7 @@ int CmdHF14ADesRb(const char *Cmd) { int CmdHF14ADesInfo(const char *Cmd) { (void)Cmd; // Cmd is not used so far - UsbCommand c = {CMD_MIFARE_DESFIRE_INFO}; + UsbCommand c = {CMD_MIFARE_DESFIRE_INFO, {0, 0, 0}, {{0}}}; SendCommand(&c); UsbCommand resp; @@ -257,7 +257,7 @@ void GetKeySettings(uint8_t *aid) { const char *str = messStr; uint8_t isOK = 0; uint32_t options; - UsbCommand c = {CMD_MIFARE_DESFIRE}; + UsbCommand c = {CMD_MIFARE_DESFIRE, {0, 0, 0}, {{0}}}; UsbCommand resp; //memset(messStr, 0x00, 512); diff --git a/client/cmdhfmfu.c b/client/cmdhfmfu.c index 4cdefa2ff..c648d954a 100644 --- a/client/cmdhfmfu.c +++ b/client/cmdhfmfu.c @@ -2387,7 +2387,7 @@ int CmdHF14AMfucSetPwd(const char *Cmd) { return 1; } - UsbCommand c = {CMD_MIFAREUC_SETPWD}; + UsbCommand c = {CMD_MIFAREUC_SETPWD, {0, 0, 0}, {{0}}}; memcpy(c.d.asBytes, pwd, 16); clearCommandBuffer(); SendCommand(&c); @@ -2412,7 +2412,7 @@ int CmdHF14AMfucSetPwd(const char *Cmd) { // int CmdHF14AMfucSetUid(const char *Cmd) { - UsbCommand c = {CMD_MIFAREU_READBL}; + UsbCommand c = {CMD_MIFAREU_READBL, {0, 0, 0}, {{0}}}; UsbCommand resp; uint8_t uid[7] = {0x00}; char cmdp = tolower(param_getchar(Cmd, 0)); diff --git a/client/cmdhw.c b/client/cmdhw.c index bbe254fb5..e5d050eb0 100644 --- a/client/cmdhw.c +++ b/client/cmdhw.c @@ -308,7 +308,7 @@ static void lookupChipID(uint32_t iChipID, uint32_t mem_used) { } int CmdDetectReader(const char *Cmd) { - UsbCommand c = {CMD_LISTEN_READER_FIELD}; + UsbCommand c = {CMD_LISTEN_READER_FIELD, {0, 0, 0}, {{0}}}; // 'l' means LF - 125/134 kHz if (*Cmd == 'l') { c.arg[0] = 1; @@ -326,7 +326,7 @@ int CmdDetectReader(const char *Cmd) { // ## FPGA Control int CmdFPGAOff(const char *Cmd) { (void)Cmd; // Cmd is not used so far - UsbCommand c = {CMD_FPGA_MAJOR_MODE_OFF}; + UsbCommand c = {CMD_FPGA_MAJOR_MODE_OFF, {0, 0, 0}, {{0}}}; clearCommandBuffer(); SendCommand(&c); return 0; @@ -336,7 +336,7 @@ int CmdFPGAOff(const char *Cmd) { int CmdLCD(const char *Cmd) { int i, j; - UsbCommand c = {CMD_LCD}; + UsbCommand c = {CMD_LCD, {0, 0, 0}, {{0}}}; sscanf(Cmd, "%x %d", &i, &j); while (j--) { c.arg[0] = i & 0x1ff; @@ -363,7 +363,7 @@ int CmdReadmem(const char *Cmd) { int CmdReset(const char *Cmd) { (void)Cmd; // Cmd is not used so far - UsbCommand c = {CMD_HARDWARE_RESET}; + UsbCommand c = {CMD_HARDWARE_RESET, {0, 0, 0}, {{0}}}; clearCommandBuffer(); SendCommand(&c); return 0; @@ -394,7 +394,7 @@ int CmdSetMux(const char *Cmd) { return 1; } - UsbCommand c = {CMD_SET_ADC_MUX}; + UsbCommand c = {CMD_SET_ADC_MUX, {0, 0, 0}, {{0}}}; if (strcmp(Cmd, "lopkd") == 0) c.arg[0] = 0; else if (strcmp(Cmd, "loraw") == 0) c.arg[0] = 1; @@ -455,7 +455,7 @@ int CmdVersion(const char *Cmd) { int CmdStatus(const char *Cmd) { (void)Cmd; // Cmd is not used so far clearCommandBuffer(); - UsbCommand c = {CMD_STATUS}; + UsbCommand c = {CMD_STATUS, {0, 0, 0}, {{0}}}; SendCommand(&c); if (!WaitForResponseTimeout(CMD_ACK, &c, 1900)) PrintAndLogEx(NORMAL, "Status command failed. USB Speed Test timed out"); @@ -466,7 +466,7 @@ int CmdPing(const char *Cmd) { (void)Cmd; // Cmd is not used so far clearCommandBuffer(); UsbCommand resp; - UsbCommand c = {CMD_PING}; + UsbCommand c = {CMD_PING, {0, 0, 0}, {{0}}}; SendCommand(&c); if (WaitForResponseTimeout(CMD_ACK, &resp, 1000)) PrintAndLogEx(NORMAL, "Ping successful"); diff --git a/client/cmdlf.c b/client/cmdlf.c index 71863cec3..df189fc2d 100644 --- a/client/cmdlf.c +++ b/client/cmdlf.c @@ -325,7 +325,7 @@ int CmdLFSetConfig(const char *Cmd) { sample_config config = { decimation, bps, averaging, divisor, trigger_threshold }; - UsbCommand c = {CMD_SET_LF_SAMPLING_CONFIG, {0, 0, 0} }; + UsbCommand c = {CMD_SET_LF_SAMPLING_CONFIG, {0, 0, 0}, {{0}}}; memcpy(c.d.asBytes, &config, sizeof(sample_config)); clearCommandBuffer(); SendCommand(&c); diff --git a/client/cmdlfhid.c b/client/cmdlfhid.c index 7c3b20266..26e557479 100644 --- a/client/cmdlfhid.c +++ b/client/cmdlfhid.c @@ -265,7 +265,7 @@ int CmdHIDClone(const char *Cmd) { uint32_t hi2 = 0, hi = 0, lo = 0; uint32_t n = 0, i = 0; - UsbCommand c = {CMD_HID_CLONE_TAG}; + UsbCommand c = {CMD_HID_CLONE_TAG, {0, 0, 0}, {{0}}}; uint8_t ctmp = param_getchar(Cmd, 0); if (strlen(Cmd) == 0 || ctmp == 'H' || ctmp == 'h') return usage_lf_hid_clone(); diff --git a/client/cmdlfhitag.c b/client/cmdlfhitag.c index 2381152a5..dfbbd3fa3 100644 --- a/client/cmdlfhitag.c +++ b/client/cmdlfhitag.c @@ -454,7 +454,7 @@ static void printHitagConfiguration(uint8_t config) { static bool getHitagUid(uint32_t *uid) { - UsbCommand c = {CMD_READER_HITAG, {RHT2F_UID_ONLY, 0, 0} }; + UsbCommand c = {CMD_READER_HITAG, {RHT2F_UID_ONLY, 0, 0}, {{0}}}; clearCommandBuffer(); SendCommand(&c); UsbCommand resp; @@ -509,7 +509,7 @@ int CmdLFHitagInfo(const char *Cmd) { // int CmdLFHitagReader(const char *Cmd) { - UsbCommand c = {CMD_READER_HITAG, {0, 0, 0} }; + UsbCommand c = {CMD_READER_HITAG, {0, 0, 0}, {{0}}}; hitag_data *htd = (hitag_data *)c.d.asBytes; hitag_function htf = param_get32ex(Cmd, 0, 0, 10); diff --git a/client/cmdlfpcf7931.c b/client/cmdlfpcf7931.c index 0cca54209..774c9a642 100644 --- a/client/cmdlfpcf7931.c +++ b/client/cmdlfpcf7931.c @@ -145,7 +145,7 @@ int CmdLFPCF7931Write(const char *Cmd) { PrintAndLogEx(NORMAL, " pos: %d", bytepos); PrintAndLogEx(NORMAL, " data: 0x%02X", data); - UsbCommand c = {CMD_PCF7931_WRITE, { block, bytepos, data} }; + UsbCommand c = {CMD_PCF7931_WRITE, { block, bytepos, data}, {{0}}}; memcpy(c.d.asDwords, configPcf.Pwd, sizeof(configPcf.Pwd)); c.d.asDwords[7] = (configPcf.OffsetWidth + 128); c.d.asDwords[8] = (configPcf.OffsetPosition + 128); diff --git a/client/cmdlft55xx.c b/client/cmdlft55xx.c index 3b001bed4..5ea1d6a34 100644 --- a/client/cmdlft55xx.c +++ b/client/cmdlft55xx.c @@ -1844,7 +1844,7 @@ int CmdT55xxChkPwds(const char *Cmd) { uint64_t t1 = msclock(); if (cmdp == 'm') { - UsbCommand c = {CMD_T55XX_CHKPWDS, {0, 0, 0} }; + UsbCommand c = {CMD_T55XX_CHKPWDS, {0, 0, 0}, {{0}}}; clearCommandBuffer(); SendCommand(&c); UsbCommand resp; @@ -2287,7 +2287,7 @@ int CmdT55xxSetDeviceConfig(const char *Cmd) { t55xx_config conf = { startgap * 8, writegap * 8, write0 * 8, write1 * 8, readgap * 8 }; - UsbCommand c = {CMD_SET_LF_T55XX_CONFIG, {shall_persist, 0, 0} }; + UsbCommand c = {CMD_SET_LF_T55XX_CONFIG, {shall_persist, 0, 0}, {{0}}}; memcpy(c.d.asBytes, &conf, sizeof(t55xx_config)); clearCommandBuffer(); SendCommand(&c);