Fix compilation warnings: values never read
Fixes: pn53x.c:523:11: warning: Value stored to 'pbtRawData' is never read pbtRawData += szRawData - 8; ^ ~~~~~~~~~~~~~ pn53x.c:544:7: warning: Value stored to 'pbtRawData' is never read pbtRawData += 2; ^ ~ pn53x.c:532:7: warning: Value stored to 'pbtRawData' is never read pbtRawData += 8; ^ ~ pn53x.c:3085:3: warning: Value stored to 'buflen' is never read buflen -= res; ^ ~~~ pn53x.c:3080:3: warning: Value stored to 'buf' is never read buf += res; ^ ~~~ target-subr.c:466:7: warning: Value stored to 'dst' is never read dst += sprintf(dst, "* Unknown card, sorry\n"); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ target-subr.c:480:3: warning: Value stored to 'dst' is never read dst += sprint_hex(dst, nfi.abtSysCode, 2); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ target-subr.c:490:3: warning: Value stored to 'dst' is never read dst += sprint_hex(dst, nji.btId, 4); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ target-subr.c:546:7: warning: Value stored to 'dst' is never read dst += sprintf(dst, "\n"); ^ ~~~~~~~~~~~~~~~~~~ target-subr.c:571:5: warning: Value stored to 'dst' is never read dst += sprint_hex(dst, nii.abtAtr, nii.szAtrLen); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ target-subr.c:580:3: warning: Value stored to 'dst' is never read dst += sprint_hex(dst, nsi.abtUID, 8); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ target-subr.c:593:3: warning: Value stored to 'dst' is never read dst += sprintf(dst, " Fab Code: %02X\n", nci.btFabCode); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ target-subr.c:608:5: warning: Value stored to 'dst' is never read dst += sprint_hex(dst, ndi.abtGB, ndi.szGB); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This commit is contained in:
parent
70b0dffca7
commit
2334adc8bd
2 changed files with 10 additions and 13 deletions
|
@ -520,7 +520,6 @@ pn53x_decode_target_data(const uint8_t *pbtRawData, size_t szRawData, pn53x_type
|
|||
pnti->nii.btConfig = *(pbtRawData++);
|
||||
if (pnti->nii.btConfig & 0x40) {
|
||||
memcpy(pnti->nii.abtAtr, pbtRawData, szRawData - 8);
|
||||
pbtRawData += szRawData - 8;
|
||||
pnti->nii.szAtrLen = szRawData - 8;
|
||||
}
|
||||
}
|
||||
|
@ -529,7 +528,6 @@ pn53x_decode_target_data(const uint8_t *pbtRawData, size_t szRawData, pn53x_type
|
|||
case NMT_ISO14443B2SR:
|
||||
// Store the UID
|
||||
memcpy(pnti->nsi.abtUID, pbtRawData, 8);
|
||||
pbtRawData += 8;
|
||||
break;
|
||||
|
||||
case NMT_ISO14443B2CT:
|
||||
|
@ -541,7 +539,6 @@ pn53x_decode_target_data(const uint8_t *pbtRawData, size_t szRawData, pn53x_type
|
|||
pnti->nci.btFabCode = *(pbtRawData++);
|
||||
// Store UID MSB
|
||||
memcpy(pnti->nci.abtUID + 2, pbtRawData, 2);
|
||||
pbtRawData += 2;
|
||||
break;
|
||||
|
||||
case NMT_FELICA:
|
||||
|
@ -3077,12 +3074,12 @@ pn53x_get_information_about(nfc_device *pnd, char **pbuf)
|
|||
free(*pbuf);
|
||||
return NFC_ESOFT;
|
||||
}
|
||||
buf += res;
|
||||
//buf += res;
|
||||
if (buflen <= (size_t)res) {
|
||||
free(*pbuf);
|
||||
return NFC_EOVFLOW;
|
||||
}
|
||||
buflen -= res;
|
||||
//buflen -= res;
|
||||
|
||||
return NFC_SUCCESS;
|
||||
}
|
||||
|
|
|
@ -463,7 +463,7 @@ sprint_nfc_iso14443a_info(char *dst, const nfc_iso14443a_info nai, bool verbose)
|
|||
break;
|
||||
}
|
||||
if (! found_possible_match) {
|
||||
dst += sprintf(dst, "* Unknown card, sorry\n");
|
||||
sprintf(dst, "* Unknown card, sorry\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -477,7 +477,7 @@ sprint_nfc_felica_info(char *dst, const nfc_felica_info nfi, bool verbose)
|
|||
dst += sprintf(dst, " Parameter (PAD): ");
|
||||
dst += sprint_hex(dst, nfi.abtPad, 8);
|
||||
dst += sprintf(dst, " System Code (SC): ");
|
||||
dst += sprint_hex(dst, nfi.abtSysCode, 2);
|
||||
sprint_hex(dst, nfi.abtSysCode, 2);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -487,7 +487,7 @@ sprint_nfc_jewel_info(char *dst, const nfc_jewel_info nji, bool verbose)
|
|||
dst += sprintf(dst, " ATQA (SENS_RES): ");
|
||||
dst += sprint_hex(dst, nji.btSensRes, 2);
|
||||
dst += sprintf(dst, " 4-LSB JEWELID: ");
|
||||
dst += sprint_hex(dst, nji.btId, 4);
|
||||
sprint_hex(dst, nji.btId, 4);
|
||||
}
|
||||
|
||||
#define PI_ISO14443_4_SUPPORTED 0x01
|
||||
|
@ -543,7 +543,7 @@ sprint_nfc_iso14443b_info(char *dst, const nfc_iso14443b_info nbi, bool verbose)
|
|||
dst += sprintf(dst, "* Frame options supported: ");
|
||||
if ((nbi.abtProtocolInfo[2] & PI_NAD_SUPPORTED) != 0) dst += sprintf(dst, "NAD ");
|
||||
if ((nbi.abtProtocolInfo[2] & PI_CID_SUPPORTED) != 0) dst += sprintf(dst, "CID ");
|
||||
dst += sprintf(dst, "\n");
|
||||
sprintf(dst, "\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -568,7 +568,7 @@ sprint_nfc_iso14443bi_info(char *dst, const nfc_iso14443bi_info nii, bool verbos
|
|||
}
|
||||
if ((nii.btVerLog & 0x80) && (nii.btConfig & 0x40)) {
|
||||
dst += sprintf(dst, " ATS: ");
|
||||
dst += sprint_hex(dst, nii.abtAtr, nii.szAtrLen);
|
||||
sprint_hex(dst, nii.abtAtr, nii.szAtrLen);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -577,7 +577,7 @@ sprint_nfc_iso14443b2sr_info(char *dst, const nfc_iso14443b2sr_info nsi, bool ve
|
|||
{
|
||||
(void) verbose;
|
||||
dst += sprintf(dst, " UID: ");
|
||||
dst += sprint_hex(dst, nsi.abtUID, 8);
|
||||
sprint_hex(dst, nsi.abtUID, 8);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -590,7 +590,7 @@ sprint_nfc_iso14443b2ct_info(char *dst, const nfc_iso14443b2ct_info nci, bool ve
|
|||
dst += sprint_hex(dst, nci.abtUID, sizeof(nci.abtUID));
|
||||
dst += sprintf(dst, " UID (decimal): %010u\n", uid);
|
||||
dst += sprintf(dst, " Product Code: %02X\n", nci.btProdCode);
|
||||
dst += sprintf(dst, " Fab Code: %02X\n", nci.btFabCode);
|
||||
sprintf(dst, " Fab Code: %02X\n", nci.btFabCode);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -605,7 +605,7 @@ sprint_nfc_dep_info(char *dst, const nfc_dep_info ndi, bool verbose)
|
|||
dst += sprintf(dst, " PP: %02x\n", ndi.btPP);
|
||||
if (ndi.szGB) {
|
||||
dst += sprintf(dst, "General Bytes: ");
|
||||
dst += sprint_hex(dst, ndi.abtGB, ndi.szGB);
|
||||
sprint_hex(dst, ndi.abtGB, ndi.szGB);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue