cppchecker fixes

This commit is contained in:
iceman1001 2021-04-13 08:17:11 +02:00
commit 6eb02c5f8e
4 changed files with 7 additions and 7 deletions

View file

@ -430,7 +430,7 @@ void *mifare_cryto_preprocess_data(desfiretag_t tag, void *data, size_t *nbytes,
break;
// Append MAC
size_t bla = maced_data_length(DESFIRE(tag)->session_key, *nbytes - offset) + offset;
bla++;
(void)bla++;
memcpy(res + *nbytes, mac, 4);
@ -443,7 +443,7 @@ void *mifare_cryto_preprocess_data(desfiretag_t tag, void *data, size_t *nbytes,
if (append_mac) {
size_t len = maced_data_length(key, *nbytes);
++len;
(void)++len;
memcpy(res, data, *nbytes);
memcpy(res + *nbytes, DESFIRE(tag)->cmac, CMAC_LENGTH);
*nbytes += CMAC_LENGTH;

View file

@ -860,7 +860,7 @@ int do_iclass_simulation(int simulationMode, uint8_t *reader_mac_buf) {
} else if (cmd == ICLASS_CMD_DETECT) { // 0x0F
// not supported yet, ignore
} else if (cmd == 0x26 && len == 5) {
// } else if (cmd == 0x26 && len == 5) {
// standard ISO15693 INVENTORY command. Ignore.
} else {
// Never seen this command before
@ -1021,7 +1021,7 @@ int do_iclass_simulation_nonsec(void) {
bool button_pressed = false;
uint8_t cmd, options, block;
int len = 0;
int len;
bool exit_loop = false;
while (exit_loop == false) {
@ -1213,7 +1213,7 @@ int do_iclass_simulation_nonsec(void) {
goto send;
// } else if(cmd == ICLASS_CMD_DETECT) { // 0x0F
} else if (cmd == 0x26 && len == 5) {
// } else if (cmd == 0x26 && len == 5) {
// standard ISO15693 INVENTORY command. Ignore.
} else {
// Never seen this command before

View file

@ -2107,7 +2107,7 @@ void T55xx_ChkPwds(uint8_t flags) {
#endif
uint64_t curr = 0, prev = 0;
uint64_t curr, prev = 0;
int32_t idx = -1;
for (uint32_t i = 0; i < pwd_count; i++) {

View file

@ -271,7 +271,7 @@ void MifareDES_Auth1(uint8_t *datain) {
memcpy(keybytes, PICC_MASTER_KEY8, 8);
} else if (payload->algo == MFDES_ALGO_AES || payload->algo == MFDES_ALGO_3DES) {
memcpy(keybytes, PICC_MASTER_KEY16, 16);
} else if (payload->algo == MFDES_ALGO_3DES) {
} else if (payload->algo == MFDES_ALGO_3K3DES) {
memcpy(keybytes, PICC_MASTER_KEY24, 24);
}
} else {