diff --git a/libnfc/drivers/acr122.c b/libnfc/drivers/acr122.c index 670dc50..dc6697b 100644 --- a/libnfc/drivers/acr122.c +++ b/libnfc/drivers/acr122.c @@ -166,7 +166,7 @@ acr122_list_devices(nfc_device_desc_t pnddDevices[], size_t szDevices, size_t *p while ((acDeviceNames[szPos] != '\0') && ((*pszDeviceFound) < szDevices)) { uiBusIndex++; - DBG("- %s (pos=%d)", acDeviceNames + szPos, szPos); + DBG("- %s (pos=%ld)", acDeviceNames + szPos, (unsigned long) szPos); bSupported = false; for (i = 0; supported_devices[i] && !bSupported; i++) { diff --git a/libnfc/drivers/pn53x_usb.c b/libnfc/drivers/pn53x_usb.c index 5ece91c..dd6fa84 100644 --- a/libnfc/drivers/pn53x_usb.c +++ b/libnfc/drivers/pn53x_usb.c @@ -141,14 +141,14 @@ bool pn53x_usb_list_devices(nfc_device_desc_t pnddDevices[], size_t szDevices, s // Test if we reach the maximum "wanted" devices if((*pszDeviceFound) == szDevices) { - DBG("Found %d devices",*pszDeviceFound); + DBG("Found %ld devices", (unsigned long) *pszDeviceFound); return true; } } } } } - DBG("Found %d devices",*pszDeviceFound); + DBG("Found %ld devices", (unsigned long) *pszDeviceFound); if(*pszDeviceFound) return true; return false; diff --git a/libnfc/nfc.c b/libnfc/nfc.c index ed04105..ec351df 100644 --- a/libnfc/nfc.c +++ b/libnfc/nfc.c @@ -113,7 +113,7 @@ nfc_list_devices(nfc_device_desc_t pnddDevices[], size_t szDevices, size_t *pszD if (drivers_callbacks_list[uiDriver].list_devices (pnddDevices + (*pszDeviceFound), szDevices - (*pszDeviceFound), &szN)) { *pszDeviceFound += szN; - DBG("%d device(s) found using %s driver", szN, drivers_callbacks_list[uiDriver].acDriver); + DBG("%ld device(s) found using %s driver", (unsigned long) szN, drivers_callbacks_list[uiDriver].acDriver); } } else @@ -613,7 +613,7 @@ nfc_initiator_poll_targets(const nfc_device_t* pnd, res = pnd->pdc->transceive(pnd->nds, pbtTxInAutoPoll, szTxInAutoPoll, abtRx, &szRxLen); if((szRxLen == 0)||(res == false)) { - DBG("pnd->pdc->tranceive() failed: szRxLen=%d, res=%d", szRxLen, res); + DBG("pnd->pdc->tranceive() failed: szRxLen=%ld, res=%d", (unsigned long) szRxLen, res); return false; } else { *pszTargetFound = abtRx[0];