aboutsummaryrefslogtreecommitdiffstats
path: root/src/AlsaInput.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2019-07-03 15:48:30 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2019-07-03 15:48:30 +0200
commit36219517c52ad97ab96545c9289b82890861d77b (patch)
tree7d1f73ac9c3c0009df86ef4210ecba6f39b90bd8 /src/AlsaInput.cpp
parente7a9a94fb8ebd50e10ed403ef871620181d3aa1d (diff)
downloadODR-AudioEnc-36219517c52ad97ab96545c9289b82890861d77b.tar.gz
ODR-AudioEnc-36219517c52ad97ab96545c9289b82890861d77b.tar.bz2
ODR-AudioEnc-36219517c52ad97ab96545c9289b82890861d77b.zip
Enable -Wall and fix a few warnings
Diffstat (limited to 'src/AlsaInput.cpp')
-rw-r--r--src/AlsaInput.cpp5
1 files changed, 2 insertions, 3 deletions
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