From b7026bf248948a6a30386ddbcc137f48f369a51e Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 19 Aug 2008 22:39:54 +0200 Subject: add a few more gcc warning flags and fix quite a few problems found by doing so --- src/pulsecore/sound-file-stream.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/pulsecore/sound-file-stream.c') diff --git a/src/pulsecore/sound-file-stream.c b/src/pulsecore/sound-file-stream.c index 8b2a29b9..c30c16eb 100644 --- a/src/pulsecore/sound-file-stream.c +++ b/src/pulsecore/sound-file-stream.c @@ -170,10 +170,10 @@ static int sink_input_pop_cb(pa_sink_input *i, size_t length, pa_memchunk *chunk if (u->readf_function) { fs = pa_frame_size(&i->sample_spec); - n = u->readf_function(u->sndfile, p, length/fs); + n = u->readf_function(u->sndfile, p, (sf_count_t) (length/fs)); } else { fs = 1; - n = sf_read_raw(u->sndfile, p, length); + n = sf_read_raw(u->sndfile, p, (sf_count_t) length); } pa_memblock_release(tchunk.memblock); @@ -186,7 +186,7 @@ static int sink_input_pop_cb(pa_sink_input *i, size_t length, pa_memchunk *chunk break; } - tchunk.length = n * fs; + tchunk.length = (size_t) n * fs; pa_memblockq_push(u->memblockq, &tchunk); pa_memblock_unref(tchunk.memblock); @@ -310,8 +310,8 @@ int pa_play_file( break; } - ss.rate = sfinfo.samplerate; - ss.channels = sfinfo.channels; + ss.rate = (uint32_t) sfinfo.samplerate; + ss.channels = (uint8_t) sfinfo.channels; if (!pa_sample_spec_valid(&ss)) { pa_log("Unsupported sample format in file %s", fname); -- cgit