summaryrefslogtreecommitdiff
path: root/examples
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 /examples
parent8bbbf56403808ff75126cd0840a936aedbc4113b (diff)
downloadflac-ce8a75134cace056f6c436d54b57bad1a1d93797.tar.gz
Fix a bunch of printf format warnings.
Diffstat (limited to 'examples')
-rw-r--r--examples/c/decode/file/main.c6
-rw-r--r--examples/c/encode/file/main.c8
2 files changed, 3 insertions, 11 deletions
diff --git a/examples/c/decode/file/main.c b/examples/c/decode/file/main.c
index 32b55594..e5138b4f 100644
--- a/examples/c/decode/file/main.c
+++ b/examples/c/decode/file/main.c
@@ -174,11 +174,7 @@ void metadata_callback(const FLAC__StreamDecoder *decoder, const FLAC__StreamMet
fprintf(stderr, "sample rate : %u Hz\n", sample_rate);
fprintf(stderr, "channels : %u\n", channels);
fprintf(stderr, "bits per sample: %u\n", bps);
-#ifdef _MSC_VER
- fprintf(stderr, "total samples : %I64u\n", total_samples);
-#else
- fprintf(stderr, "total samples : %llu\n", total_samples);
-#endif
+ fprintf(stderr, "total samples : %" PRIu64 "\n", total_samples);
}
}
diff --git a/examples/c/encode/file/main.c b/examples/c/encode/file/main.c
index 0f7f4c0b..1baad1d3 100644
--- a/examples/c/encode/file/main.c
+++ b/examples/c/encode/file/main.c
@@ -79,7 +79,7 @@ int main(int argc, char *argv[])
channels = 2;
bps = 16;
total_samples = (((((((unsigned)buffer[43] << 8) | buffer[42]) << 8) | buffer[41]) << 8) | buffer[40]) / 4;
-
+
/* allocate the encoder */
if((encoder = FLAC__stream_encoder_new()) == NULL) {
fprintf(stderr, "ERROR: allocating encoder\n");
@@ -165,9 +165,5 @@ void progress_callback(const FLAC__StreamEncoder *encoder, FLAC__uint64 bytes_wr
{
(void)encoder, (void)client_data;
-#ifdef _MSC_VER
- fprintf(stderr, "wrote %I64u bytes, %I64u/%u samples, %u/%u frames\n", bytes_written, samples_written, total_samples, frames_written, total_frames_estimate);
-#else
- fprintf(stderr, "wrote %llu bytes, %llu/%u samples, %u/%u frames\n", bytes_written, samples_written, total_samples, frames_written, total_frames_estimate);
-#endif
+ fprintf(stderr, "wrote %" PRIu64 " bytes, %" PRIu64 "/%u samples, %u/%u frames\n", bytes_written, samples_written, total_samples, frames_written, total_frames_estimate);
}