diff options
author | Chris Robinson <[email protected]> | 2023-12-08 04:33:32 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2023-12-08 04:33:32 -0800 |
commit | 8f661a2f59e63cbed540b512dc564a3aca7c4211 (patch) | |
tree | 8c8fbd2be037eaaf254feabe061642bea96c4bd2 /alc/backends | |
parent | 5b5b948516f7340810ebbfdd5e46eb40f85d2e56 (diff) |
Fix some clang-tidy warnings
Diffstat (limited to 'alc/backends')
-rw-r--r-- | alc/backends/alsa.cpp | 2 | ||||
-rw-r--r-- | alc/backends/coreaudio.cpp | 4 | ||||
-rw-r--r-- | alc/backends/dsound.cpp | 6 | ||||
-rw-r--r-- | alc/backends/oboe.cpp | 4 | ||||
-rw-r--r-- | alc/backends/oss.cpp | 2 | ||||
-rw-r--r-- | alc/backends/pipewire.cpp | 5 | ||||
-rw-r--r-- | alc/backends/portaudio.cpp | 4 | ||||
-rw-r--r-- | alc/backends/sndio.cpp | 2 | ||||
-rw-r--r-- | alc/backends/wasapi.cpp | 2 | ||||
-rw-r--r-- | alc/backends/winmm.cpp | 5 |
10 files changed, 19 insertions, 17 deletions
diff --git a/alc/backends/alsa.cpp b/alc/backends/alsa.cpp index 5aae834a..47c6385e 100644 --- a/alc/backends/alsa.cpp +++ b/alc/backends/alsa.cpp @@ -1039,7 +1039,7 @@ void AlsaCapture::captureSamples(std::byte *buffer, uint samples) { if(mRing) { - mRing->read(buffer, samples); + std::ignore = mRing->read(buffer, samples); return; } diff --git a/alc/backends/coreaudio.cpp b/alc/backends/coreaudio.cpp index 16b0781e..50e3bc66 100644 --- a/alc/backends/coreaudio.cpp +++ b/alc/backends/coreaudio.cpp @@ -657,7 +657,7 @@ OSStatus CoreAudioCapture::RecordProc(AudioUnitRenderActionFlags *ioActionFlags, return err; } - mRing->write(mCaptureData.data(), inNumberFrames); + std::ignore = mRing->write(mCaptureData.data(), inNumberFrames); return noErr; } @@ -924,7 +924,7 @@ void CoreAudioCapture::captureSamples(std::byte *buffer, uint samples) { if(!mConverter) { - mRing->read(buffer, samples); + std::ignore = mRing->read(buffer, samples); return; } diff --git a/alc/backends/dsound.cpp b/alc/backends/dsound.cpp index 58aa69b2..12196f74 100644 --- a/alc/backends/dsound.cpp +++ b/alc/backends/dsound.cpp @@ -717,7 +717,7 @@ void DSoundCapture::stop() } void DSoundCapture::captureSamples(std::byte *buffer, uint samples) -{ mRing->read(buffer, samples); } +{ std::ignore = mRing->read(buffer, samples); } uint DSoundCapture::availableSamples() { @@ -740,9 +740,9 @@ uint DSoundCapture::availableSamples() } if(SUCCEEDED(hr)) { - mRing->write(ReadPtr1, ReadCnt1/FrameSize); + std::ignore = mRing->write(ReadPtr1, ReadCnt1/FrameSize); if(ReadPtr2 != nullptr && ReadCnt2 > 0) - mRing->write(ReadPtr2, ReadCnt2/FrameSize); + std::ignore = mRing->write(ReadPtr2, ReadCnt2/FrameSize); hr = mDSCbuffer->Unlock(ReadPtr1, ReadCnt1, ReadPtr2, ReadCnt2); mCursor = ReadCursor; } diff --git a/alc/backends/oboe.cpp b/alc/backends/oboe.cpp index b7bab19a..9666063a 100644 --- a/alc/backends/oboe.cpp +++ b/alc/backends/oboe.cpp @@ -230,7 +230,7 @@ struct OboeCapture final : public BackendBase, public oboe::AudioStreamCallback oboe::DataCallbackResult OboeCapture::onAudioReady(oboe::AudioStream*, void *audioData, int32_t numFrames) { - mRing->write(audioData, static_cast<uint32_t>(numFrames)); + std::ignore = mRing->write(audioData, static_cast<uint32_t>(numFrames)); return oboe::DataCallbackResult::Continue; } @@ -330,7 +330,7 @@ uint OboeCapture::availableSamples() { return static_cast<uint>(mRing->readSpace()); } void OboeCapture::captureSamples(std::byte *buffer, uint samples) -{ mRing->read(buffer, samples); } +{ std::ignore = mRing->read(buffer, samples); } } // namespace diff --git a/alc/backends/oss.cpp b/alc/backends/oss.cpp index 87d3ba35..010b0749 100644 --- a/alc/backends/oss.cpp +++ b/alc/backends/oss.cpp @@ -617,7 +617,7 @@ void OSScapture::stop() } void OSScapture::captureSamples(std::byte *buffer, uint samples) -{ mRing->read(buffer, samples); } +{ std::ignore = mRing->read(buffer, samples); } uint OSScapture::availableSamples() { return static_cast<uint>(mRing->readSpace()); } diff --git a/alc/backends/pipewire.cpp b/alc/backends/pipewire.cpp index 01896b01..96b6623f 100644 --- a/alc/backends/pipewire.cpp +++ b/alc/backends/pipewire.cpp @@ -1933,7 +1933,8 @@ void PipeWireCapture::inputCallback() noexcept const uint offset{minu(bufdata->chunk->offset, bufdata->maxsize)}; const uint size{minu(bufdata->chunk->size, bufdata->maxsize - offset)}; - mRing->write(static_cast<char*>(bufdata->data) + offset, size / mRing->getElemSize()); + std::ignore = mRing->write(static_cast<char*>(bufdata->data) + offset, + size / mRing->getElemSize()); pw_stream_queue_buffer(mStream.get(), pw_buf); } @@ -2154,7 +2155,7 @@ uint PipeWireCapture::availableSamples() { return static_cast<uint>(mRing->readSpace()); } void PipeWireCapture::captureSamples(std::byte *buffer, uint samples) -{ mRing->read(buffer, samples); } +{ std::ignore = mRing->read(buffer, samples); } } // namespace diff --git a/alc/backends/portaudio.cpp b/alc/backends/portaudio.cpp index 979a54d6..2e2e33cc 100644 --- a/alc/backends/portaudio.cpp +++ b/alc/backends/portaudio.cpp @@ -271,7 +271,7 @@ PortCapture::~PortCapture() int PortCapture::readCallback(const void *inputBuffer, void*, unsigned long framesPerBuffer, const PaStreamCallbackTimeInfo*, const PaStreamCallbackFlags) noexcept { - mRing->write(inputBuffer, framesPerBuffer); + std::ignore = mRing->write(inputBuffer, framesPerBuffer); return 0; } @@ -350,7 +350,7 @@ uint PortCapture::availableSamples() { return static_cast<uint>(mRing->readSpace()); } void PortCapture::captureSamples(std::byte *buffer, uint samples) -{ mRing->read(buffer, samples); } +{ std::ignore = mRing->read(buffer, samples); } } // namespace diff --git a/alc/backends/sndio.cpp b/alc/backends/sndio.cpp index d54c337b..8bf63a59 100644 --- a/alc/backends/sndio.cpp +++ b/alc/backends/sndio.cpp @@ -497,7 +497,7 @@ void SndioCapture::stop() } void SndioCapture::captureSamples(std::byte *buffer, uint samples) -{ mRing->read(buffer, samples); } +{ std::ignore = mRing->read(buffer, samples); } uint SndioCapture::availableSamples() { return static_cast<uint>(mRing->readSpace()); } diff --git a/alc/backends/wasapi.cpp b/alc/backends/wasapi.cpp index 436ee402..139fa696 100644 --- a/alc/backends/wasapi.cpp +++ b/alc/backends/wasapi.cpp @@ -2651,7 +2651,7 @@ void WasapiCapture::stopProxy() void WasapiCapture::captureSamples(std::byte *buffer, uint samples) -{ mRing->read(buffer, samples); } +{ std::ignore = mRing->read(buffer, samples); } uint WasapiCapture::availableSamples() { return static_cast<uint>(mRing->readSpace()); } diff --git a/alc/backends/winmm.cpp b/alc/backends/winmm.cpp index f0fb0a1c..15776d17 100644 --- a/alc/backends/winmm.cpp +++ b/alc/backends/winmm.cpp @@ -435,7 +435,8 @@ int WinMMCapture::captureProc() WAVEHDR &waveHdr = mWaveBuffer[widx]; widx = (widx+1) % mWaveBuffer.size(); - mRing->write(waveHdr.lpData, waveHdr.dwBytesRecorded / mFormat.nBlockAlign); + std::ignore = mRing->write(waveHdr.lpData, + waveHdr.dwBytesRecorded / mFormat.nBlockAlign); mReadable.fetch_sub(1, std::memory_order_acq_rel); waveInAddBuffer(mInHdl, &waveHdr, sizeof(WAVEHDR)); } while(--todo); @@ -573,7 +574,7 @@ void WinMMCapture::stop() } void WinMMCapture::captureSamples(std::byte *buffer, uint samples) -{ mRing->read(buffer, samples); } +{ std::ignore = mRing->read(buffer, samples); } uint WinMMCapture::availableSamples() { return static_cast<uint>(mRing->readSpace()); } |