diff --git a/libnfc/target-subr.c b/libnfc/target-subr.c index 97e2882..61cedfd 100644 --- a/libnfc/target-subr.c +++ b/libnfc/target-subr.c @@ -503,7 +503,7 @@ snprint_nfc_barcode_info(char *dst, size_t size, const nfc_barcode_info *pnti, b { (void) verbose; int off = 0; - off += snprintf(dst + off, size - off, " Size (bits): %lu\n", pnti->szDataLen * 8); + off += snprintf(dst + off, size - off, " Size (bits): %lu\n", (unsigned long)(pnti->szDataLen * 8)); off += snprintf(dst + off, size - off, " Content: "); for (uint8_t i = 0; i < pnti->szDataLen; i++) { off += snprintf(dst + off, size - off, "%02X", pnti->abtData[i]); diff --git a/utils/nfc-mfclassic.c b/utils/nfc-mfclassic.c index bc3fe6c..3f22c61 100644 --- a/utils/nfc-mfclassic.c +++ b/utils/nfc-mfclassic.c @@ -695,7 +695,7 @@ main(int argc, const char *argv[]) magic2 = true; } } - printf("Guessing size: seems to be a %lu-byte card\n", (uiBlocks + 1) * sizeof(mifare_classic_block)); + printf("Guessing size: seems to be a %lu-byte card\n", (unsigned long)((uiBlocks + 1) * sizeof(mifare_classic_block))); if (bUseKeyFile) { FILE *pfKeys = fopen(argv[5], "rb"); diff --git a/utils/nfc-mfultralight.c b/utils/nfc-mfultralight.c index 3fe2100..5e71a3a 100644 --- a/utils/nfc-mfultralight.c +++ b/utils/nfc-mfultralight.c @@ -714,7 +714,7 @@ main(int argc, const char *argv[]) size_t szDump; if (((szDump = fread(&mtDump, 1, sizeof(mtDump), pfDump)) != iDumpSize && !bPart) || szDump <= 0) { - ERR("Could not read from dump file or size mismatch: %s (read %lu, expected %lu)\n", argv[2], szDump, iDumpSize); + ERR("Could not read from dump file or size mismatch: %s (read %lu, expected %lu)\n", argv[2], (unsigned long)szDump, (unsigned long)iDumpSize); fclose(pfDump); exit(EXIT_FAILURE); }