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:
Philippe Teuwen 2013-03-02 19:39:20 +01:00
parent 70b0dffca7
commit 2334adc8bd
2 changed files with 10 additions and 13 deletions

View file

@ -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;
}