summaryrefslogtreecommitdiff
path: root/src/test_libFLAC
diff options
context:
space:
mode:
authorErik de Castro Lopo <erikd@mega-nerd.com>2012-02-01 20:34:04 +1100
committerErik de Castro Lopo <erikd@mega-nerd.com>2012-02-01 20:34:04 +1100
commitce8a75134cace056f6c436d54b57bad1a1d93797 (patch)
treead3225304d65339597d053f930328a9cf437a5fb /src/test_libFLAC
parent8bbbf56403808ff75126cd0840a936aedbc4113b (diff)
downloadflac-ce8a75134cace056f6c436d54b57bad1a1d93797.tar.gz
Fix a bunch of printf format warnings.
Diffstat (limited to 'src/test_libFLAC')
-rw-r--r--src/test_libFLAC/encoders.c6
-rw-r--r--src/test_libFLAC/metadata_object.c24
2 files changed, 5 insertions, 25 deletions
diff --git a/src/test_libFLAC/encoders.c b/src/test_libFLAC/encoders.c
index 1f40c62c..9d0d0dd4 100644
--- a/src/test_libFLAC/encoders.c
+++ b/src/test_libFLAC/encoders.c
@@ -449,11 +449,7 @@ static FLAC__bool test_stream_encoder(Layer layer, FLAC__bool is_ogg)
printf("testing FLAC__stream_encoder_get_total_samples_estimate()... ");
if(FLAC__stream_encoder_get_total_samples_estimate(encoder) != streaminfo_.data.stream_info.total_samples) {
-#ifdef _MSC_VER
- printf("FAILED, expected %I64u, got %I64u\n", streaminfo_.data.stream_info.total_samples, FLAC__stream_encoder_get_total_samples_estimate(encoder));
-#else
- printf("FAILED, expected %llu, got %llu\n", (unsigned long long)streaminfo_.data.stream_info.total_samples, (unsigned long long)FLAC__stream_encoder_get_total_samples_estimate(encoder));
-#endif
+ printf("FAILED, expected %" PRIu64 ", got %" PRIu64 "\n", (uint64_t)streaminfo_.data.stream_info.total_samples, (uint64_t)FLAC__stream_encoder_get_total_samples_estimate(encoder));
return false;
}
printf("OK\n");
diff --git a/src/test_libFLAC/metadata_object.c b/src/test_libFLAC/metadata_object.c
index c9a8479c..fd0f8c72 100644
--- a/src/test_libFLAC/metadata_object.c
+++ b/src/test_libFLAC/metadata_object.c
@@ -47,11 +47,7 @@ static FLAC__bool compare_track_(const FLAC__StreamMetadata_CueSheet_Track *from
unsigned i;
if(from->offset != to->offset) {
-#ifdef _MSC_VER
- printf("FAILED, track offset mismatch, expected %I64u, got %I64u\n", to->offset, from->offset);
-#else
- printf("FAILED, track offset mismatch, expected %llu, got %llu\n", (unsigned long long)to->offset, (unsigned long long)from->offset);
-#endif
+ printf("FAILED, track offset mismatch, expected %" PRIu64 ", got %" PRIu64 "\n", (uint64_t)to->offset, (uint64_t)from->offset);
return false;
}
if(from->number != to->number) {
@@ -83,11 +79,7 @@ static FLAC__bool compare_track_(const FLAC__StreamMetadata_CueSheet_Track *from
else {
for(i = 0; i < to->num_indices; i++) {
if(from->indices[i].offset != to->indices[i].offset) {
-#ifdef _MSC_VER
- printf("FAILED, track indices[%u].offset mismatch, expected %I64u, got %I64u\n", i, to->indices[i].offset, from->indices[i].offset);
-#else
- printf("FAILED, track indices[%u].offset mismatch, expected %llu, got %llu\n", i, (unsigned long long)to->indices[i].offset, (unsigned long long)from->indices[i].offset);
-#endif
+ printf("FAILED, track indices[%u].offset mismatch, expected %" PRIu64 ", got %" PRIu64 "\n", i, (uint64_t)to->indices[i].offset, (uint64_t)from->indices[i].offset);
return false;
}
if(from->indices[i].number != to->indices[i].number) {
@@ -109,19 +101,11 @@ static FLAC__bool compare_seekpoint_array_(const FLAC__StreamMetadata_SeekPoint
for(i = 0; i < n; i++) {
if(from[i].sample_number != to[i].sample_number) {
-#ifdef _MSC_VER
- printf("FAILED, point[%u].sample_number mismatch, expected %I64u, got %I64u\n", i, to[i].sample_number, from[i].sample_number);
-#else
- printf("FAILED, point[%u].sample_number mismatch, expected %llu, got %llu\n", i, (unsigned long long)to[i].sample_number, (unsigned long long)from[i].sample_number);
-#endif
+ printf("FAILED, point[%u].sample_number mismatch, expected %" PRIu64 ", got %" PRIu64 "\n", i, (uint64_t)to[i].sample_number, (uint64_t)from[i].sample_number);
return false;
}
if(from[i].stream_offset != to[i].stream_offset) {
-#ifdef _MSC_VER
- printf("FAILED, point[%u].stream_offset mismatch, expected %I64u, got %I64u\n", i, to[i].stream_offset, from[i].stream_offset);
-#else
- printf("FAILED, point[%u].stream_offset mismatch, expected %llu, got %llu\n", i, (unsigned long long)to[i].stream_offset, (unsigned long long)from[i].stream_offset);
-#endif
+ printf("FAILED, point[%u].stream_offset mismatch, expected %" PRIu64 ", got %" PRIu64 "\n", i, (uint64_t)to[i].stream_offset, (uint64_t)from[i].stream_offset);
return false;
}
if(from[i].frame_samples != to[i].frame_samples) {