From c0e174c085478e8bcea1a31d527df6e58f7448d1 Mon Sep 17 00:00:00 2001 From: Thierry Bultel Date: Fri, 29 Jun 2018 15:52:46 +0200 Subject: Fixed compilation warnings Fixed all the compilation warning that appeared with the latest version of gcc. There are still warnings in the gstreamer headers, that would likely be fixed by a gstreamer bump. Change-Id: I3ae7698dbff47303be366d9755a643a013bb4e51 Signed-off-by: Thierry Bultel --- binding/radio_output_pulse.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'binding/radio_output_pulse.c') diff --git a/binding/radio_output_pulse.c b/binding/radio_output_pulse.c index a49687b..8b2957e 100644 --- a/binding/radio_output_pulse.c +++ b/binding/radio_output_pulse.c @@ -32,7 +32,6 @@ static int16_t extra_buf[1]; static unsigned char *output_buf; static void pa_context_state_cb(pa_context *c, void *data) { - pa_operation *o; assert(c); switch (pa_context_get_state(c)) { @@ -220,10 +219,10 @@ void radio_output_close(void) output_buf = NULL; } -int radio_output_write(void *buf, int len) +ssize_t radio_output_write(void *buf, int len) { - int rc = -EINVAL; - int error; + ssize_t rc = -EINVAL; + size_t n = len; size_t avail; int samples = len / 2; @@ -284,7 +283,7 @@ int radio_output_write(void *buf, int len) } if ((rc = pa_stream_write(stream, p, n, NULL, 0, PA_SEEK_RELATIVE)) < 0) { - fprintf(stderr, "Error writing %d bytes to PulseAudio : %s\n", + fprintf(stderr, "Error writing %zu bytes to PulseAudio : %s\n", n, pa_strerror(pa_context_errno(context))); } exit: -- cgit 1.2.3-korg