summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Astafyev <dev@246060.ru>2019-11-30 08:04:37 +0300
committerErik de Castro Lopo <erikd@mega-nerd.com>2019-12-09 06:13:11 +1100
commita3d8927c2b745d299bd039858dc1173586c6b0b0 (patch)
tree0f3257e63505b62783d52737be11a287a2c56d7e
parenta9d9f4d353cf55d97808e6e4edda42bcdfb02fe1 (diff)
downloadflac-a3d8927c2b745d299bd039858dc1173586c6b0b0.tar.gz
Correct printf specifiers to unsigned int where needed
-rw-r--r--examples/c/decode/file/main.c2
-rw-r--r--src/test_libFLAC++/decoders.cpp2
-rw-r--r--src/test_libFLAC++/metadata_manip.cpp2
-rw-r--r--src/test_libFLAC/crc.c10
-rw-r--r--src/test_libFLAC/metadata_manip.c4
5 files changed, 10 insertions, 10 deletions
diff --git a/examples/c/decode/file/main.c b/examples/c/decode/file/main.c
index ed64732f..8b3710bd 100644
--- a/examples/c/decode/file/main.c
+++ b/examples/c/decode/file/main.c
@@ -126,7 +126,7 @@ FLAC__StreamDecoderWriteStatus write_callback(const FLAC__StreamDecoder *decoder
return FLAC__STREAM_DECODER_WRITE_STATUS_ABORT;
}
if(frame->header.channels != 2) {
- fprintf(stderr, "ERROR: This frame contains %d channels (should be 2)\n", frame->header.channels);
+ fprintf(stderr, "ERROR: This frame contains %u channels (should be 2)\n", frame->header.channels);
return FLAC__STREAM_DECODER_WRITE_STATUS_ABORT;
}
if(buffer [0] == NULL) {
diff --git a/src/test_libFLAC++/decoders.cpp b/src/test_libFLAC++/decoders.cpp
index a937f1fc..a3633092 100644
--- a/src/test_libFLAC++/decoders.cpp
+++ b/src/test_libFLAC++/decoders.cpp
@@ -152,7 +152,7 @@ void DecoderCommon::common_metadata_callback_(const ::FLAC__StreamMetadata *meta
if(error_occurred_)
return;
- printf("%d... ", current_metadata_number_);
+ printf("%u... ", current_metadata_number_);
fflush(stdout);
if(current_metadata_number_ >= num_expected_) {
diff --git a/src/test_libFLAC++/metadata_manip.cpp b/src/test_libFLAC++/metadata_manip.cpp
index ab98aa10..f9380d9e 100644
--- a/src/test_libFLAC++/metadata_manip.cpp
+++ b/src/test_libFLAC++/metadata_manip.cpp
@@ -475,7 +475,7 @@ void OurFileDecoder::metadata_callback(const ::FLAC__StreamMetadata *metadata)
if(error_occurred_)
return;
- printf("%d... ", mc_our_block_number_);
+ printf("%u... ", mc_our_block_number_);
fflush(stdout);
if(!ignore_metadata_) {
diff --git a/src/test_libFLAC/crc.c b/src/test_libFLAC/crc.c
index 800f3fa4..55f78a7e 100644
--- a/src/test_libFLAC/crc.c
+++ b/src/test_libFLAC/crc.c
@@ -124,7 +124,7 @@ static FLAC__bool test_crc8(const FLAC__byte *data, size_t size)
crc1 = FLAC__crc8(data, i + 1);
if (crc1 != crc0) {
- printf("FAILED, FLAC__crc8 result did not match reference CRC for %i bytes of test data\n", i + 1);
+ printf("FAILED, FLAC__crc8 result did not match reference CRC for %u bytes of test data\n", i + 1);
return false;
}
}
@@ -154,7 +154,7 @@ static FLAC__bool test_crc16(const FLAC__byte *data, size_t size)
crc1 = FLAC__crc16(data, i + 1);
if (crc1 != crc0) {
- printf("FAILED, FLAC__crc16 result did not match reference CRC for %i bytes of test data\n", i + 1);
+ printf("FAILED, FLAC__crc16 result did not match reference CRC for %u bytes of test data\n", i + 1);
return false;
}
}
@@ -179,7 +179,7 @@ static FLAC__bool test_crc16_update(const FLAC__byte *data, size_t size)
crc1 = FLAC__CRC16_UPDATE(data[i], crc1);
if (crc1 != crc0) {
- printf("FAILED, FLAC__CRC16_UPDATE result did not match reference CRC after %i bytes of test data\n", i + 1);
+ printf("FAILED, FLAC__CRC16_UPDATE result did not match reference CRC after %u bytes of test data\n", i + 1);
return false;
}
}
@@ -211,7 +211,7 @@ static FLAC__bool test_crc16_32bit_words(const FLAC__uint32 *words, size_t size)
crc1 = FLAC__crc16_update_words32(words + i, n, crc1);
if (crc1 != crc0) {
- printf("FAILED, FLAC__crc16_update_words32 result did not match reference CRC after %i words of test data\n", i + n);
+ printf("FAILED, FLAC__crc16_update_words32 result did not match reference CRC after %u words of test data\n", i + n);
return false;
}
}
@@ -255,7 +255,7 @@ static FLAC__bool test_crc16_64bit_words(const FLAC__uint64 *words, size_t size)
crc1 = FLAC__crc16_update_words64(words + i, n, crc1);
if (crc1 != crc0) {
- printf("FAILED, FLAC__crc16_update_words64 result did not match reference CRC after %i words of test data\n", i + n);
+ printf("FAILED, FLAC__crc16_update_words64 result did not match reference CRC after %u words of test data\n", i + n);
return false;
}
}
diff --git a/src/test_libFLAC/metadata_manip.c b/src/test_libFLAC/metadata_manip.c
index f72c20ca..4f74f7c7 100644
--- a/src/test_libFLAC/metadata_manip.c
+++ b/src/test_libFLAC/metadata_manip.c
@@ -472,7 +472,7 @@ static void decoder_metadata_callback_null_(const FLAC__StreamDecoder *decoder,
{
(void)decoder, (void)metadata, (void)client_data;
- printf("%d... ", mc_our_block_number_);
+ printf("%u... ", mc_our_block_number_);
fflush(stdout);
mc_our_block_number_++;
@@ -489,7 +489,7 @@ static void decoder_metadata_callback_compare_(const FLAC__StreamDecoder *decode
if(dcd->error_occurred)
return;
- printf("%d... ", mc_our_block_number_);
+ printf("%u... ", mc_our_block_number_);
fflush(stdout);
if(mc_our_block_number_ >= our_metadata_.num_blocks) {