diff options
author | Roger Leigh <rleigh@codelibre.net> | 2021-01-17 17:34:50 +0000 |
---|---|---|
committer | Roger Leigh <rleigh@codelibre.net> | 2021-01-27 22:00:36 +0000 |
commit | 01717f8f2b95b533f2c4ffe5093ef1d64730bcdc (patch) | |
tree | 9263ca1b315f3ef3f04606798d173b8c25ec886e | |
parent | 22bef56e70f9958e97e9daf45b036982070f5fca (diff) | |
download | libtiff-git-01717f8f2b95b533f2c4ffe5093ef1d64730bcdc.tar.gz |
check_tag: Use PRI format flags and remove unnecessary casts
-rw-r--r-- | test/check_tag.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/test/check_tag.c b/test/check_tag.c index afbb5ce0..63554866 100644 --- a/test/check_tag.c +++ b/test/check_tag.c @@ -35,13 +35,13 @@ CheckShortField(TIFF *tif, const ttag_t field, const uint16_t value) uint16_t tmp = 123; if (!TIFFGetField(tif, field, &tmp)) { - fprintf (stderr, "Problem fetching tag %lu.\n", - (unsigned long) field); + fprintf (stderr, "Problem fetching tag %"PRIu32".\n", + field); return -1; } if (tmp != value) { - fprintf (stderr, "Wrong SHORT value fetched for tag %lu.\n", - (unsigned long) field); + fprintf (stderr, "Wrong SHORT value fetched for tag %"PRIu32".\n", + field); return -1; } @@ -54,13 +54,13 @@ CheckShortPairedField(TIFF *tif, const ttag_t field, const uint16_t *values) uint16_t tmp[2] = {123, 456 }; if (!TIFFGetField(tif, field, tmp, tmp + 1)) { - fprintf (stderr, "Problem fetching tag %lu.\n", - (unsigned long) field); + fprintf (stderr, "Problem fetching tag %"PRIu32".\n", + field); return -1; } if (tmp[0] != values[0] || tmp[1] != values[1]) { - fprintf (stderr, "Wrong SHORT PAIR fetched for tag %lu.\n", - (unsigned long) field); + fprintf (stderr, "Wrong SHORT PAIR fetched for tag %"PRIu32".\n", + field); return -1; } @@ -73,13 +73,13 @@ CheckLongField(TIFF *tif, const ttag_t field, const uint32_t value) uint32_t tmp = 123; if (!TIFFGetField(tif, field, &tmp)) { - fprintf (stderr, "Problem fetching tag %lu.\n", - (unsigned long) field); + fprintf (stderr, "Problem fetching tag %"PRIu32".\n", + field); return -1; } if (tmp != value) { - fprintf (stderr, "Wrong LONG value fetched for tag %lu.\n", - (unsigned long) field); + fprintf (stderr, "Wrong LONG value fetched for tag %"PRIu32".\n", + field); return -1; } |