Skip to content

Commit

Permalink
Merge pull request nfc-tools#520 from stawiski/master
Browse files Browse the repository at this point in the history
Fixed format warnings.
  • Loading branch information
AdamLaurie authored Apr 4, 2020
2 parents fba9694 + 54ba735 commit c34c446
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion libnfc/target-subr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
Expand Down
2 changes: 1 addition & 1 deletion utils/nfc-mfclassic.c
Original file line number Diff line number Diff line change
Expand Up @@ -846,7 +846,7 @@ main(int argc, const char *argv[])
}
} else
printf("RATS support: no\n");
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 size is 4k check for direct-write card
if (uiBlocks == 0xff) {
Expand Down
2 changes: 1 addition & 1 deletion utils/nfc-mfultralight.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit c34c446

Please sign in to comment.