diff --git a/examples/nfc-list.c b/examples/nfc-list.c index 7d9493e..b6249d0 100644 --- a/examples/nfc-list.c +++ b/examples/nfc-list.c @@ -54,7 +54,6 @@ int main(int argc, const char* argv[]) size_t szDeviceFound; size_t szTargetFound; size_t i; - nfc_target_info_t nti; nfc_device_desc_t *pnddDevices; // Display libnfc version diff --git a/libnfc/chips/pn53x.c b/libnfc/chips/pn53x.c index ef3800a..982189b 100644 --- a/libnfc/chips/pn53x.c +++ b/libnfc/chips/pn53x.c @@ -241,6 +241,7 @@ bool pn53x_unwrap_frame(const byte_t* pbtFrame, const size_t szFrameBits, byte_t bool pn53x_decode_target_data(const byte_t* pbtRawData, size_t szDataLen, nfc_chip_t nc, nfc_target_type_t ntt, nfc_target_info_t* pnti) { + uint8_t ui8AttribResLen; switch(ntt) { case NTT_MIFARE: case NTT_GENERIC_PASSIVE_106: @@ -290,7 +291,7 @@ pn53x_decode_target_data(const byte_t* pbtRawData, size_t szDataLen, nfc_chip_t pbtRawData += 12; // Store temporarily the ATTRIB_RES length - uint8_t ui8AttribResLen = *(pbtRawData++); + ui8AttribResLen = *(pbtRawData++); // Store the 4 bytes ID memcpy(pnti->nbi.abtId, pbtRawData,4); diff --git a/libnfc/nfc.c b/libnfc/nfc.c index 3cb5fa0..d2780a2 100644 --- a/libnfc/nfc.c +++ b/libnfc/nfc.c @@ -525,11 +525,11 @@ nfc_initiator_list_passive_targets(nfc_device_t* pnd, const nfc_modulation_t nmI { nfc_target_info_t nti; size_t szTargetFound = 0; + byte_t* pbtInitData = NULL; + size_t szInitDataLen = 0; // Let the reader only try once to find a target nfc_configure (pnd, NDO_INFINITE_SELECT, false); - byte_t* pbtInitData = NULL; - size_t szInitDataLen = 0; if(nmInitModulation == NM_ISO14443B_106) { // Application Family Identifier (AFI) must equals 0x00 in order to wakeup all ISO14443-B PICCs (see ISO/IEC 14443-3)