From 36219517c52ad97ab96545c9289b82890861d77b Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Wed, 3 Jul 2019 15:48:30 +0200 Subject: Enable -Wall and fix a few warnings --- src/AlsaInput.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/AlsaInput.cpp') diff --git a/src/AlsaInput.cpp b/src/AlsaInput.cpp index 747814f..0d3b40e 100644 --- a/src/AlsaInput.cpp +++ b/src/AlsaInput.cpp @@ -106,12 +106,11 @@ void AlsaInput::m_init_alsa() ssize_t AlsaInput::m_read(uint8_t* buf, snd_pcm_uframes_t length) { - int i; int err; err = snd_pcm_readi(m_alsa_handle, buf, length); - if (err != length) { + if (err != (ssize_t)length) { if (err < 0) { fprintf (stderr, "read from audio interface failed (%s)\n", snd_strerror(err)); @@ -176,7 +175,7 @@ bool AlsaInputDirect::read_source(size_t num_bytes) if (ret > 0) { m_queue.push(buf.data(), ret * bytes_per_frame); } - return ret == num_frames; + return ret == (ssize_t)num_frames; } #endif // HAVE_ALSA -- cgit v1.2.3