Fix a brunch of warnings.

This commit is contained in:
Romain Tartiere 2010-01-22 16:06:26 +00:00
parent ecdb1afb6e
commit 10b8b92eb9
3 changed files with 6 additions and 6 deletions

View file

@ -83,7 +83,7 @@ main(int argc, char *argv[])
for (size_t n = 0; n < sector_count; n++) { for (size_t n = 0; n < sector_count; n++) {
if (try_format_sector (*tag, n) < 0) { if (try_format_sector (*tag, n) < 0) {
warnx ("%s: Can't format sector %d (0x%02x)", tag_uid, n, n); warnx ("%s: Can't format sector %ld (0x%02lx)", tag_uid, n, n);
error = 1; error = 1;
} }
} }

View file

@ -11,12 +11,12 @@ setup ()
int res; int res;
device = nfc_connect (NULL); device = nfc_connect (NULL);
cut_assert_not_null (device, "No device found"); cut_assert_not_null (device, cut_message ("No device found"));
tags = mifare_classic_get_tags (device); tags = mifare_classic_get_tags (device);
cut_assert_not_null (tags ,"Error enumerating NFC tags"); cut_assert_not_null (tags, cut_message ("Error enumerating NFC tags"));
cut_assert_not_null (tags[0], "No MIFARE CLassic tag on NFC device"); cut_assert_not_null (tags[0], cut_message ("No MIFARE CLassic tag on NFC device"));
tag = tags[0]; tag = tags[0];

View file

@ -103,7 +103,7 @@ void
test_mifare_classic_read_mad (void) test_mifare_classic_read_mad (void)
{ {
Mad mad = mad_read (tag); Mad mad = mad_read (tag);
cut_assert_not_null (tag); cut_assert_not_null (mad);
} }
void void
@ -169,7 +169,7 @@ test_mifare_classic_value_block_increment (void)
int32_t value; int32_t value;
MifareClassicBlockNumber adr; MifareClassicBlockNumber adr;
res = mifare_classic_read_value (tag, block, &value, &adr); res = mifare_classic_read_value (tag, block, &value, &adr);
cut_assert_equal_int (0, res, 0); cut_assert_equal_int (0, res);
cut_assert_equal_int (1000, value); cut_assert_equal_int (1000, value);
cut_assert_equal_int (0x00, adr); cut_assert_equal_int (0x00, adr);