diff options
author | Chris Robinson <[email protected]> | 2019-07-28 17:15:34 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2019-07-28 17:15:34 -0700 |
commit | b4d56d3fdff4243ae2a3fc64934ced2af3187690 (patch) | |
tree | 9a9809e2e991037aa5798a05ab7321d143b95e5f | |
parent | c8bbd75bf9a6f0170ec95b130b3eb17cd8cdd5ad (diff) |
Remove the UNUSED macro
29 files changed, 96 insertions, 126 deletions
diff --git a/Alc/backends/base.cpp b/Alc/backends/base.cpp index 5239ae5b..5748975e 100644 --- a/Alc/backends/base.cpp +++ b/Alc/backends/base.cpp @@ -29,7 +29,7 @@ BackendBase::~BackendBase() = default; ALCboolean BackendBase::reset() { return ALC_FALSE; } -ALCenum BackendBase::captureSamples(void* UNUSED(buffer), ALCuint UNUSED(samples)) +ALCenum BackendBase::captureSamples(void*, ALCuint) { return ALC_INVALID_DEVICE; } ALCuint BackendBase::availableSamples() diff --git a/Alc/backends/coreaudio.cpp b/Alc/backends/coreaudio.cpp index a776cb9e..c6978505 100644 --- a/Alc/backends/coreaudio.cpp +++ b/Alc/backends/coreaudio.cpp @@ -81,9 +81,8 @@ OSStatus CoreAudioPlayback::MixerProcC(void *inRefCon, inBusNumber, inNumberFrames, ioData); } -OSStatus CoreAudioPlayback::MixerProc(AudioUnitRenderActionFlags* UNUSED(ioActionFlags), - const AudioTimeStamp* UNUSED(inTimeStamp), UInt32 UNUSED(inBusNumber), - UInt32 UNUSED(inNumberFrames), AudioBufferList *ioData) +OSStatus CoreAudioPlayback::MixerProc(AudioUnitRenderActionFlags*, + const AudioTimeStamp*, UInt32, UInt32, AudioBufferList *ioData) { lock(); aluMixData(mDevice, ioData->mBuffers[0].mData, ioData->mBuffers[0].mDataByteSize/mFrameSize); @@ -347,9 +346,9 @@ OSStatus CoreAudioCapture::RecordProcC(void *inRefCon, inBusNumber, inNumberFrames, ioData); } -OSStatus CoreAudioCapture::RecordProc(AudioUnitRenderActionFlags* UNUSED(ioActionFlags), - const AudioTimeStamp *inTimeStamp, UInt32 UNUSED(inBusNumber), UInt32 inNumberFrames, - AudioBufferList* UNUSED(ioData)) +OSStatus CoreAudioCapture::RecordProc(AudioUnitRenderActionFlags*, + const AudioTimeStamp *inTimeStamp, UInt32, UInt32 inNumberFrames, + AudioBufferList*) { AudioUnitRenderActionFlags flags = 0; union { diff --git a/Alc/backends/dsound.cpp b/Alc/backends/dsound.cpp index 5c77df60..d4c1033c 100644 --- a/Alc/backends/dsound.cpp +++ b/Alc/backends/dsound.cpp @@ -127,7 +127,7 @@ bool checkName(const al::vector<DevMap> &list, const std::string &name) ) != list.cend(); } -BOOL CALLBACK DSoundEnumDevices(GUID *guid, const WCHAR *desc, const WCHAR* UNUSED(drvname), void *data) +BOOL CALLBACK DSoundEnumDevices(GUID *guid, const WCHAR *desc, const WCHAR*, void *data) { if(!guid) return TRUE; diff --git a/Alc/backends/loopback.cpp b/Alc/backends/loopback.cpp index 5d133d8e..77606b89 100644 --- a/Alc/backends/loopback.cpp +++ b/Alc/backends/loopback.cpp @@ -64,13 +64,13 @@ void LoopbackBackend::stop() bool LoopbackBackendFactory::init() { return true; } -bool LoopbackBackendFactory::querySupport(BackendType UNUSED(type)) +bool LoopbackBackendFactory::querySupport(BackendType) { return true; } void LoopbackBackendFactory::probe(DevProbe, std::string*) { } -BackendPtr LoopbackBackendFactory::createBackend(ALCdevice *device, BackendType UNUSED(type)) +BackendPtr LoopbackBackendFactory::createBackend(ALCdevice *device, BackendType) { return BackendPtr{new LoopbackBackend{device}}; } BackendFactory &LoopbackBackendFactory::getFactory() diff --git a/Alc/backends/opensl.cpp b/Alc/backends/opensl.cpp index be483338..452028ea 100644 --- a/Alc/backends/opensl.cpp +++ b/Alc/backends/opensl.cpp @@ -198,7 +198,7 @@ OpenSLPlayback::~OpenSLPlayback() void OpenSLPlayback::processC(SLAndroidSimpleBufferQueueItf bq, void *context) { static_cast<OpenSLPlayback*>(context)->process(bq); } -void OpenSLPlayback::process(SLAndroidSimpleBufferQueueItf UNUSED(bq)) +void OpenSLPlayback::process(SLAndroidSimpleBufferQueueItf) { /* A note on the ringbuffer usage: The buffer queue seems to hold on to the * pointer passed to the Enqueue method, rather than copying the audio. @@ -650,7 +650,7 @@ OpenSLCapture::~OpenSLCapture() void OpenSLCapture::processC(SLAndroidSimpleBufferQueueItf bq, void *context) { static_cast<OpenSLCapture*>(context)->process(bq); } -void OpenSLCapture::process(SLAndroidSimpleBufferQueueItf UNUSED(bq)) +void OpenSLCapture::process(SLAndroidSimpleBufferQueueItf) { /* A new chunk has been written into the ring buffer, advance it. */ mRing->writeAdvance(1); diff --git a/Alc/backends/portaudio.cpp b/Alc/backends/portaudio.cpp index 5277f36b..10c8261b 100644 --- a/Alc/backends/portaudio.cpp +++ b/Alc/backends/portaudio.cpp @@ -109,9 +109,9 @@ int PortPlayback::writeCallbackC(const void *inputBuffer, void *outputBuffer, framesPerBuffer, timeInfo, statusFlags); } -int PortPlayback::writeCallback(const void* UNUSED(inputBuffer), void *outputBuffer, - unsigned long framesPerBuffer, const PaStreamCallbackTimeInfo* UNUSED(timeInfo), - const PaStreamCallbackFlags UNUSED(statusFlags)) +int PortPlayback::writeCallback(const void*, void *outputBuffer, + unsigned long framesPerBuffer, const PaStreamCallbackTimeInfo*, + const PaStreamCallbackFlags) { lock(); aluMixData(mDevice, outputBuffer, framesPerBuffer); @@ -275,9 +275,9 @@ int PortCapture::readCallbackC(const void *inputBuffer, void *outputBuffer, framesPerBuffer, timeInfo, statusFlags); } -int PortCapture::readCallback(const void *inputBuffer, void *UNUSED(outputBuffer), - unsigned long framesPerBuffer, const PaStreamCallbackTimeInfo *UNUSED(timeInfo), - const PaStreamCallbackFlags UNUSED(statusFlags)) +int PortCapture::readCallback(const void *inputBuffer, void*, + unsigned long framesPerBuffer, const PaStreamCallbackTimeInfo*, + const PaStreamCallbackFlags) { mRing->write(inputBuffer, framesPerBuffer); return 0; diff --git a/Alc/backends/pulseaudio.cpp b/Alc/backends/pulseaudio.cpp index a19663eb..97736253 100644 --- a/Alc/backends/pulseaudio.cpp +++ b/Alc/backends/pulseaudio.cpp @@ -496,7 +496,7 @@ pa_stream *pulse_connect_stream(const char *device_name, std::unique_lock<std::m } -void device_sink_callback(pa_context *UNUSED(context), const pa_sink_info *info, int eol, void* /*pdata*/) +void device_sink_callback(pa_context*, const pa_sink_info *info, int eol, void*) { if(eol) { @@ -567,7 +567,7 @@ void probePlaybackDevices() } -void device_source_callback(pa_context *UNUSED(context), const pa_source_info *info, int eol, void* /*pdata*/) +void device_source_callback(pa_context*, const pa_source_info *info, int eol, void*) { if(eol) { @@ -751,7 +751,7 @@ void PulsePlayback::streamWriteCallback(pa_stream *stream, size_t nbytes) void PulsePlayback::sinkInfoCallbackC(pa_context *context, const pa_sink_info *info, int eol, void *pdata) { static_cast<PulsePlayback*>(pdata)->sinkInfoCallback(context, info, eol); } -void PulsePlayback::sinkInfoCallback(pa_context* UNUSED(context), const pa_sink_info *info, int eol) +void PulsePlayback::sinkInfoCallback(pa_context*, const pa_sink_info *info, int eol) { struct ChannelMap { DevFmtChannels chans; @@ -798,7 +798,7 @@ void PulsePlayback::sinkInfoCallback(pa_context* UNUSED(context), const pa_sink_ void PulsePlayback::sinkNameCallbackC(pa_context *context, const pa_sink_info *info, int eol, void *pdata) { static_cast<PulsePlayback*>(pdata)->sinkNameCallback(context, info, eol); } -void PulsePlayback::sinkNameCallback(pa_context* UNUSED(context), const pa_sink_info *info, int eol) +void PulsePlayback::sinkNameCallback(pa_context*, const pa_sink_info *info, int eol) { if(eol) { @@ -1171,7 +1171,7 @@ void PulseCapture::streamStateCallback(pa_stream *stream) void PulseCapture::sourceNameCallbackC(pa_context *context, const pa_source_info *info, int eol, void *pdata) { static_cast<PulseCapture*>(pdata)->sourceNameCallback(context, info, eol); } -void PulseCapture::sourceNameCallback(pa_context* UNUSED(context), const pa_source_info *info, int eol) +void PulseCapture::sourceNameCallback(pa_context*, const pa_source_info *info, int eol) { if(eol) { diff --git a/Alc/backends/winmm.cpp b/Alc/backends/winmm.cpp index f23ac53c..57abee06 100644 --- a/Alc/backends/winmm.cpp +++ b/Alc/backends/winmm.cpp @@ -169,8 +169,7 @@ void CALLBACK WinMMPlayback::waveOutProcC(HWAVEOUT device, UINT msg, DWORD_PTR i * Posts a message to 'WinMMPlayback::mixerProc' everytime a WaveOut Buffer is * completed and returns to the application (for more data) */ -void CALLBACK WinMMPlayback::waveOutProc(HWAVEOUT UNUSED(device), UINT msg, - DWORD_PTR UNUSED(param1), DWORD_PTR UNUSED(param2)) +void CALLBACK WinMMPlayback::waveOutProc(HWAVEOUT, UINT msg, DWORD_PTR, DWORD_PTR) { if(msg != WOM_DONE) return; mWritable.fetch_add(1, std::memory_order_acq_rel); @@ -414,8 +413,7 @@ void CALLBACK WinMMCapture::waveInProcC(HWAVEIN device, UINT msg, DWORD_PTR inst * Posts a message to 'WinMMCapture::captureProc' everytime a WaveIn Buffer is * completed and returns to the application (with more data). */ -void CALLBACK WinMMCapture::waveInProc(HWAVEIN UNUSED(device), UINT msg, - DWORD_PTR UNUSED(param1), DWORD_PTR UNUSED(param2)) +void CALLBACK WinMMCapture::waveInProc(HWAVEIN, UINT msg, DWORD_PTR, DWORD_PTR) { if(msg != WIM_DATA) return; mReadable.fetch_add(1, std::memory_order_acq_rel); diff --git a/Alc/effects/autowah.cpp b/Alc/effects/autowah.cpp index f1160804..8545de1f 100644 --- a/Alc/effects/autowah.cpp +++ b/Alc/effects/autowah.cpp @@ -77,7 +77,7 @@ struct ALautowahState final : public EffectState { DEF_NEWDEL(ALautowahState) }; -ALboolean ALautowahState::deviceUpdate(const ALCdevice *UNUSED(device)) +ALboolean ALautowahState::deviceUpdate(const ALCdevice*) { /* (Re-)initializing parameters and clear the buffers. */ diff --git a/Alc/effects/compressor.cpp b/Alc/effects/compressor.cpp index 542ef684..82f70317 100644 --- a/Alc/effects/compressor.cpp +++ b/Alc/effects/compressor.cpp @@ -74,7 +74,7 @@ ALboolean CompressorState::deviceUpdate(const ALCdevice *device) return AL_TRUE; } -void CompressorState::update(const ALCcontext* UNUSED(context), const ALeffectslot *slot, const EffectProps *props, const EffectTarget target) +void CompressorState::update(const ALCcontext*, const ALeffectslot *slot, const EffectProps *props, const EffectTarget target) { mEnabled = props->Compressor.OnOff; diff --git a/Alc/effects/dedicated.cpp b/Alc/effects/dedicated.cpp index b5fdb626..f31cc903 100644 --- a/Alc/effects/dedicated.cpp +++ b/Alc/effects/dedicated.cpp @@ -45,13 +45,13 @@ struct DedicatedState final : public EffectState { DEF_NEWDEL(DedicatedState) }; -ALboolean DedicatedState::deviceUpdate(const ALCdevice *UNUSED(device)) +ALboolean DedicatedState::deviceUpdate(const ALCdevice*) { std::fill(std::begin(mCurrentGains), std::end(mCurrentGains), 0.0f); return AL_TRUE; } -void DedicatedState::update(const ALCcontext* UNUSED(context), const ALeffectslot *slot, const EffectProps *props, const EffectTarget target) +void DedicatedState::update(const ALCcontext*, const ALeffectslot *slot, const EffectProps *props, const EffectTarget target) { std::fill(std::begin(mTargetGains), std::end(mTargetGains), 0.0f); diff --git a/Alc/effects/distortion.cpp b/Alc/effects/distortion.cpp index a58ac5a6..94af9e11 100644 --- a/Alc/effects/distortion.cpp +++ b/Alc/effects/distortion.cpp @@ -55,7 +55,7 @@ struct DistortionState final : public EffectState { DEF_NEWDEL(DistortionState) }; -ALboolean DistortionState::deviceUpdate(const ALCdevice *UNUSED(device)) +ALboolean DistortionState::deviceUpdate(const ALCdevice*) { mLowpass.clear(); mBandpass.clear(); diff --git a/Alc/effects/equalizer.cpp b/Alc/effects/equalizer.cpp index 995f03df..961ae8fc 100644 --- a/Alc/effects/equalizer.cpp +++ b/Alc/effects/equalizer.cpp @@ -99,7 +99,7 @@ struct EqualizerState final : public EffectState { DEF_NEWDEL(EqualizerState) }; -ALboolean EqualizerState::deviceUpdate(const ALCdevice *UNUSED(device)) +ALboolean EqualizerState::deviceUpdate(const ALCdevice*) { for(auto &e : mChans) { diff --git a/Alc/effects/fshifter.cpp b/Alc/effects/fshifter.cpp index 6378db89..68e10cba 100644 --- a/Alc/effects/fshifter.cpp +++ b/Alc/effects/fshifter.cpp @@ -88,7 +88,7 @@ struct FshifterState final : public EffectState { DEF_NEWDEL(FshifterState) }; -ALboolean FshifterState::deviceUpdate(const ALCdevice *UNUSED(device)) +ALboolean FshifterState::deviceUpdate(const ALCdevice*) { /* (Re-)initializing parameters and clear the buffers. */ mCount = FIFO_LATENCY; diff --git a/Alc/effects/modulator.cpp b/Alc/effects/modulator.cpp index 46d17d1c..8377aefe 100644 --- a/Alc/effects/modulator.cpp +++ b/Alc/effects/modulator.cpp @@ -59,7 +59,7 @@ inline ALfloat Square(ALsizei index) return static_cast<ALfloat>(((index>>(WAVEFORM_FRACBITS-2))&2) - 1); } -inline ALfloat One(ALsizei UNUSED(index)) +inline ALfloat One(ALsizei) { return 1.0f; } @@ -98,7 +98,7 @@ struct ModulatorState final : public EffectState { DEF_NEWDEL(ModulatorState) }; -ALboolean ModulatorState::deviceUpdate(const ALCdevice *UNUSED(device)) +ALboolean ModulatorState::deviceUpdate(const ALCdevice*) { for(auto &e : mChans) { diff --git a/Alc/effects/null.cpp b/Alc/effects/null.cpp index 6076a2d9..3c27bae0 100644 --- a/Alc/effects/null.cpp +++ b/Alc/effects/null.cpp @@ -34,20 +34,21 @@ NullState::NullState() = default; */ NullState::~NullState() = default; -/* This updates the device-dependant effect state. This is called on +/* This updates the device-dependant effect state. This is called on state * initialization and any time the device parameters (e.g. playback frequency, * format) have been changed. Will always be followed by a call to the update * method, if successful. */ -ALboolean NullState::deviceUpdate(const ALCdevice* UNUSED(device)) +ALboolean NullState::deviceUpdate(const ALCdevice* /*device*/) { return AL_TRUE; } -/* This updates the effect state. This is called any time the effect is - * (re)loaded into a slot. +/* This updates the effect state with new properties. This is called any time + * the effect is (re)loaded into a slot. */ -void NullState::update(const ALCcontext* UNUSED(context), const ALeffectslot* UNUSED(slot), const EffectProps* UNUSED(props), const EffectTarget UNUSED(target)) +void NullState::update(const ALCcontext* /*context*/, const ALeffectslot* /*slot*/, + const EffectProps* /*props*/, const EffectTarget /*target*/) { } @@ -55,12 +56,14 @@ void NullState::update(const ALCcontext* UNUSED(context), const ALeffectslot* UN * input to the output buffer. The result should be added to the output buffer, * not replace it. */ -void NullState::process(const ALsizei /*samplesToDo*/, const FloatBufferLine *RESTRICT /*samplesIn*/, const ALsizei /*numInput*/, const al::span<FloatBufferLine> /*samplesOut*/) +void NullState::process(const ALsizei /*samplesToDo*/, + const FloatBufferLine *RESTRICT /*samplesIn*/, const ALsizei /*numInput*/, + const al::span<FloatBufferLine> /*samplesOut*/) { } -void NullEffect_setParami(EffectProps *UNUSED(props), ALCcontext *context, ALenum param, ALint UNUSED(val)) +void NullEffect_setParami(EffectProps* /*props*/, ALCcontext *context, ALenum param, ALint /*val*/) { switch(param) { @@ -76,7 +79,7 @@ void NullEffect_setParamiv(EffectProps *props, ALCcontext *context, ALenum param NullEffect_setParami(props, context, param, vals[0]); } } -void NullEffect_setParamf(EffectProps *UNUSED(props), ALCcontext *context, ALenum param, ALfloat UNUSED(val)) +void NullEffect_setParamf(EffectProps* /*props*/, ALCcontext *context, ALenum param, ALfloat /*val*/) { switch(param) { @@ -93,7 +96,7 @@ void NullEffect_setParamfv(EffectProps *props, ALCcontext *context, ALenum param } } -void NullEffect_getParami(const EffectProps *UNUSED(props), ALCcontext *context, ALenum param, ALint* UNUSED(val)) +void NullEffect_getParami(const EffectProps* /*props*/, ALCcontext *context, ALenum param, ALint* /*val*/) { switch(param) { @@ -109,7 +112,7 @@ void NullEffect_getParamiv(const EffectProps *props, ALCcontext *context, ALenum NullEffect_getParami(props, context, param, vals); } } -void NullEffect_getParamf(const EffectProps *UNUSED(props), ALCcontext *context, ALenum param, ALfloat* UNUSED(val)) +void NullEffect_getParamf(const EffectProps* /*props*/, ALCcontext *context, ALenum param, ALfloat* /*val*/) { switch(param) { diff --git a/Alc/effects/pshifter.cpp b/Alc/effects/pshifter.cpp index 5a1e3817..bade81e6 100644 --- a/Alc/effects/pshifter.cpp +++ b/Alc/effects/pshifter.cpp @@ -181,7 +181,7 @@ ALboolean PshifterState::deviceUpdate(const ALCdevice *device) return AL_TRUE; } -void PshifterState::update(const ALCcontext* UNUSED(context), const ALeffectslot *slot, const EffectProps *props, const EffectTarget target) +void PshifterState::update(const ALCcontext*, const ALeffectslot *slot, const EffectProps *props, const EffectTarget target) { const float pitch{std::pow(2.0f, static_cast<ALfloat>(props->Pshifter.CoarseTune*100 + props->Pshifter.FineTune) / 1200.0f diff --git a/Alc/effects/vmorpher.cpp b/Alc/effects/vmorpher.cpp index dc402aaf..6f7e22ae 100644 --- a/Alc/effects/vmorpher.cpp +++ b/Alc/effects/vmorpher.cpp @@ -47,22 +47,21 @@ namespace { inline ALfloat Sin(ALsizei index) { - return (std::sin(static_cast<ALfloat>(index) * - (al::MathDefs<float>::Tau() / ALfloat{WAVEFORM_FRACONE})))*0.5f+0.5f; + constexpr ALfloat scale{al::MathDefs<float>::Tau() / ALfloat{WAVEFORM_FRACONE}}; + return std::sin(static_cast<ALfloat>(index) * scale)*0.5f + 0.5f; } inline ALfloat Saw(ALsizei index) { - return (static_cast<ALfloat>(index)*(2.0f/WAVEFORM_FRACONE) - 1.0f)*0.5f+0.5f; + return static_cast<ALfloat>(index) / ALfloat{WAVEFORM_FRACONE}; } inline ALfloat Triangle(ALsizei index) { - return (std::fabs(static_cast<ALfloat>(index) * (al::MathDefs<float>::Tau() / WAVEFORM_FRACONE) - - al::MathDefs<float>::Pi()) / al::MathDefs<float>::Pi())*0.5f+0.5f; + return std::fabs(static_cast<ALfloat>(index)*(2.0f/WAVEFORM_FRACONE) - 1.0f); } -inline ALfloat Half(ALsizei UNUSED(index)) +inline ALfloat Half(ALsizei) { return 0.5f; } diff --git a/Alc/hrtf.cpp b/Alc/hrtf.cpp index 5561ebfd..73cdc24e 100644 --- a/Alc/hrtf.cpp +++ b/Alc/hrtf.cpp @@ -1195,7 +1195,7 @@ void AddBuiltInEntry(al::vector<EnumeratedHrtf> &list, const std::string &filena using ResData = al::span<const char>; #ifndef ALSOFT_EMBED_HRTF_DATA -ResData GetResource(int UNUSED(name)) +ResData GetResource(int /*name*/) { return ResData{}; } #else diff --git a/Alc/mixer/mixer_c.cpp b/Alc/mixer/mixer_c.cpp index 86a9e438..b9d51c9c 100644 --- a/Alc/mixer/mixer_c.cpp +++ b/Alc/mixer/mixer_c.cpp @@ -70,9 +70,8 @@ const ALfloat *DoResample(const InterpState *state, const ALfloat *RESTRICT src, } // namespace template<> -const ALfloat *Resample_<CopyTag,CTag>(const InterpState* UNUSED(state), - const ALfloat *RESTRICT src, ALsizei UNUSED(frac), ALint UNUSED(increment), - ALfloat *RESTRICT dst, ALsizei dstlen) +const ALfloat *Resample_<CopyTag,CTag>(const InterpState*, const ALfloat *RESTRICT src, ALsizei, + ALint, ALfloat *RESTRICT dst, ALsizei dstlen) { ASSUME(dstlen > 0); #if defined(HAVE_SSE) || defined(HAVE_NEON) diff --git a/Alc/mixer/mixer_neon.cpp b/Alc/mixer/mixer_neon.cpp index c30e9861..81d0ff67 100644 --- a/Alc/mixer/mixer_neon.cpp +++ b/Alc/mixer/mixer_neon.cpp @@ -15,9 +15,8 @@ template<> -const ALfloat *Resample_<LerpTag,NEONTag>(const InterpState* UNUSED(state), - const ALfloat *RESTRICT src, ALsizei frac, ALint increment, - ALfloat *RESTRICT dst, ALsizei dstlen) +const ALfloat *Resample_<LerpTag,NEONTag>(const InterpState*, const ALfloat *RESTRICT src, + ALsizei frac, ALint increment, ALfloat *RESTRICT dst, ALsizei dstlen) { const int32x4_t increment4 = vdupq_n_s32(increment*4); const float32x4_t fracOne4 = vdupq_n_f32(1.0f/FRACTIONONE); diff --git a/Alc/mixer/mixer_sse2.cpp b/Alc/mixer/mixer_sse2.cpp index 2b594d90..b5d00106 100644 --- a/Alc/mixer/mixer_sse2.cpp +++ b/Alc/mixer/mixer_sse2.cpp @@ -28,9 +28,8 @@ template<> -const ALfloat *Resample_<LerpTag,SSE2Tag>(const InterpState* UNUSED(state), - const ALfloat *RESTRICT src, ALsizei frac, ALint increment, - ALfloat *RESTRICT dst, ALsizei dstlen) +const ALfloat *Resample_<LerpTag,SSE2Tag>(const InterpState*, const ALfloat *RESTRICT src, + ALsizei frac, ALint increment, ALfloat *RESTRICT dst, ALsizei dstlen) { const __m128i increment4{_mm_set1_epi32(increment*4)}; const __m128 fracOne4{_mm_set1_ps(1.0f/FRACTIONONE)}; diff --git a/Alc/mixer/mixer_sse41.cpp b/Alc/mixer/mixer_sse41.cpp index 55639f11..7efbda7b 100644 --- a/Alc/mixer/mixer_sse41.cpp +++ b/Alc/mixer/mixer_sse41.cpp @@ -29,9 +29,8 @@ template<> -const ALfloat *Resample_<LerpTag,SSE4Tag>(const InterpState* UNUSED(state), - const ALfloat *RESTRICT src, ALsizei frac, ALint increment, - ALfloat *RESTRICT dst, ALsizei dstlen) +const ALfloat *Resample_<LerpTag,SSE4Tag>(const InterpState*, const ALfloat *RESTRICT src, + ALsizei frac, ALint increment, ALfloat *RESTRICT dst, ALsizei dstlen) { const __m128i increment4{_mm_set1_epi32(increment*4)}; const __m128 fracOne4{_mm_set1_ps(1.0f/FRACTIONONE)}; diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h index 33b2fc39..85bc9cbc 100644 --- a/OpenAL32/Include/alMain.h +++ b/OpenAL32/Include/alMain.h @@ -38,19 +38,6 @@ struct Uhj2Encoder; struct bs2b; -#ifndef UNUSED -#if defined(__cplusplus) -#define UNUSED(x) -#elif defined(__GNUC__) -#define UNUSED(x) UNUSED_##x __attribute__((unused)) -#elif defined(__LCLINT__) -#define UNUSED(x) /*@unused@*/ x -#else -#define UNUSED(x) x -#endif -#endif - - #if defined(__BYTE_ORDER__) && defined(__ORDER_LITTLE_ENDIAN__) #define IS_LITTLE_ENDIAN (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__) #else diff --git a/OpenAL32/alBuffer.cpp b/OpenAL32/alBuffer.cpp index f20b0aee..843d4e76 100644 --- a/OpenAL32/alBuffer.cpp +++ b/OpenAL32/alBuffer.cpp @@ -759,9 +759,9 @@ START_API_FUNC END_API_FUNC -AL_API void AL_APIENTRY alBufferSamplesSOFT(ALuint UNUSED(buffer), - ALuint UNUSED(samplerate), ALenum UNUSED(internalformat), ALsizei UNUSED(samples), - ALenum UNUSED(channels), ALenum UNUSED(type), const ALvoid *UNUSED(data)) +AL_API void AL_APIENTRY alBufferSamplesSOFT(ALuint /*buffer*/, ALuint /*samplerate*/, + ALenum /*internalformat*/, ALsizei /*samples*/, ALenum /*channels*/, ALenum /*type*/, + const ALvoid* /*data*/) START_API_FUNC { ContextRef context{GetContextRef()}; @@ -771,9 +771,8 @@ START_API_FUNC } END_API_FUNC -AL_API void AL_APIENTRY alBufferSubSamplesSOFT(ALuint UNUSED(buffer), - ALsizei UNUSED(offset), ALsizei UNUSED(samples), - ALenum UNUSED(channels), ALenum UNUSED(type), const ALvoid *UNUSED(data)) +AL_API void AL_APIENTRY alBufferSubSamplesSOFT(ALuint /*buffer*/, ALsizei /*offset*/, + ALsizei /*samples*/, ALenum /*channels*/, ALenum /*type*/, const ALvoid* /*data*/) START_API_FUNC { ContextRef context{GetContextRef()}; @@ -783,9 +782,8 @@ START_API_FUNC } END_API_FUNC -AL_API void AL_APIENTRY alGetBufferSamplesSOFT(ALuint UNUSED(buffer), - ALsizei UNUSED(offset), ALsizei UNUSED(samples), - ALenum UNUSED(channels), ALenum UNUSED(type), ALvoid *UNUSED(data)) +AL_API void AL_APIENTRY alGetBufferSamplesSOFT(ALuint /*buffer*/, ALsizei /*offset*/, + ALsizei /*samples*/, ALenum /*channels*/, ALenum /*type*/, ALvoid* /*data*/) START_API_FUNC { ContextRef context{GetContextRef()}; @@ -795,7 +793,7 @@ START_API_FUNC } END_API_FUNC -AL_API ALboolean AL_APIENTRY alIsBufferFormatSupportedSOFT(ALenum UNUSED(format)) +AL_API ALboolean AL_APIENTRY alIsBufferFormatSupportedSOFT(ALenum /*format*/) START_API_FUNC { ContextRef context{GetContextRef()}; @@ -807,7 +805,7 @@ START_API_FUNC END_API_FUNC -AL_API void AL_APIENTRY alBufferf(ALuint buffer, ALenum param, ALfloat UNUSED(value)) +AL_API void AL_APIENTRY alBufferf(ALuint buffer, ALenum param, ALfloat /*value*/) START_API_FUNC { ContextRef context{GetContextRef()}; @@ -826,7 +824,8 @@ START_API_FUNC } END_API_FUNC -AL_API void AL_APIENTRY alBuffer3f(ALuint buffer, ALenum param, ALfloat UNUSED(value1), ALfloat UNUSED(value2), ALfloat UNUSED(value3)) +AL_API void AL_APIENTRY alBuffer3f(ALuint buffer, ALenum param, + ALfloat /*value1*/, ALfloat /*value2*/, ALfloat /*value3*/) START_API_FUNC { ContextRef context{GetContextRef()}; @@ -901,7 +900,8 @@ START_API_FUNC } END_API_FUNC -AL_API void AL_APIENTRY alBuffer3i(ALuint buffer, ALenum param, ALint UNUSED(value1), ALint UNUSED(value2), ALint UNUSED(value3)) +AL_API void AL_APIENTRY alBuffer3i(ALuint buffer, ALenum param, + ALint /*value1*/, ALint /*value2*/, ALint /*value3*/) START_API_FUNC { ContextRef context{GetContextRef()}; diff --git a/OpenAL32/alFilter.cpp b/OpenAL32/alFilter.cpp index d7826b6f..209ddc87 100644 --- a/OpenAL32/alFilter.cpp +++ b/OpenAL32/alFilter.cpp @@ -37,9 +37,9 @@ namespace { #define FILTER_MIN_GAIN 0.0f #define FILTER_MAX_GAIN 4.0f /* +12dB */ -void ALlowpass_setParami(ALfilter *UNUSED(filter), ALCcontext *context, ALenum param, ALint UNUSED(val)) +void ALlowpass_setParami(ALfilter*, ALCcontext *context, ALenum param, ALint) { alSetError(context, AL_INVALID_ENUM, "Invalid low-pass integer property 0x%04x", param); } -void ALlowpass_setParamiv(ALfilter *UNUSED(filter), ALCcontext *context, ALenum param, const ALint *UNUSED(vals)) +void ALlowpass_setParamiv(ALfilter*, ALCcontext *context, ALenum param, const ALint*) { alSetError(context, AL_INVALID_ENUM, "Invalid low-pass integer-vector property 0x%04x", param); } void ALlowpass_setParamf(ALfilter *filter, ALCcontext *context, ALenum param, ALfloat val) { @@ -64,9 +64,9 @@ void ALlowpass_setParamf(ALfilter *filter, ALCcontext *context, ALenum param, AL void ALlowpass_setParamfv(ALfilter *filter, ALCcontext *context, ALenum param, const ALfloat *vals) { ALlowpass_setParamf(filter, context, param, vals[0]); } -void ALlowpass_getParami(ALfilter *UNUSED(filter), ALCcontext *context, ALenum param, ALint *UNUSED(val)) +void ALlowpass_getParami(ALfilter*, ALCcontext *context, ALenum param, ALint*) { alSetError(context, AL_INVALID_ENUM, "Invalid low-pass integer property 0x%04x", param); } -void ALlowpass_getParamiv(ALfilter *UNUSED(filter), ALCcontext *context, ALenum param, ALint *UNUSED(vals)) +void ALlowpass_getParamiv(ALfilter*, ALCcontext *context, ALenum param, ALint*) { alSetError(context, AL_INVALID_ENUM, "Invalid low-pass integer-vector property 0x%04x", param); } void ALlowpass_getParamf(ALfilter *filter, ALCcontext *context, ALenum param, ALfloat *val) { @@ -90,9 +90,9 @@ void ALlowpass_getParamfv(ALfilter *filter, ALCcontext *context, ALenum param, A DEFINE_ALFILTER_VTABLE(ALlowpass); -void ALhighpass_setParami(ALfilter *UNUSED(filter), ALCcontext *context, ALenum param, ALint UNUSED(val)) +void ALhighpass_setParami(ALfilter*, ALCcontext *context, ALenum param, ALint) { alSetError(context, AL_INVALID_ENUM, "Invalid high-pass integer property 0x%04x", param); } -void ALhighpass_setParamiv(ALfilter *UNUSED(filter), ALCcontext *context, ALenum param, const ALint *UNUSED(vals)) +void ALhighpass_setParamiv(ALfilter*, ALCcontext *context, ALenum param, const ALint*) { alSetError(context, AL_INVALID_ENUM, "Invalid high-pass integer-vector property 0x%04x", param); } void ALhighpass_setParamf(ALfilter *filter, ALCcontext *context, ALenum param, ALfloat val) { @@ -117,9 +117,9 @@ void ALhighpass_setParamf(ALfilter *filter, ALCcontext *context, ALenum param, A void ALhighpass_setParamfv(ALfilter *filter, ALCcontext *context, ALenum param, const ALfloat *vals) { ALhighpass_setParamf(filter, context, param, vals[0]); } -void ALhighpass_getParami(ALfilter *UNUSED(filter), ALCcontext *context, ALenum param, ALint *UNUSED(val)) +void ALhighpass_getParami(ALfilter*, ALCcontext *context, ALenum param, ALint*) { alSetError(context, AL_INVALID_ENUM, "Invalid high-pass integer property 0x%04x", param); } -void ALhighpass_getParamiv(ALfilter *UNUSED(filter), ALCcontext *context, ALenum param, ALint *UNUSED(vals)) +void ALhighpass_getParamiv(ALfilter*, ALCcontext *context, ALenum param, ALint*) { alSetError(context, AL_INVALID_ENUM, "Invalid high-pass integer-vector property 0x%04x", param); } void ALhighpass_getParamf(ALfilter *filter, ALCcontext *context, ALenum param, ALfloat *val) { @@ -143,9 +143,9 @@ void ALhighpass_getParamfv(ALfilter *filter, ALCcontext *context, ALenum param, DEFINE_ALFILTER_VTABLE(ALhighpass); -void ALbandpass_setParami(ALfilter *UNUSED(filter), ALCcontext *context, ALenum param, ALint UNUSED(val)) +void ALbandpass_setParami(ALfilter*, ALCcontext *context, ALenum param, ALint) { alSetError(context, AL_INVALID_ENUM, "Invalid band-pass integer property 0x%04x", param); } -void ALbandpass_setParamiv(ALfilter *UNUSED(filter), ALCcontext *context, ALenum param, const ALint *UNUSED(vals)) +void ALbandpass_setParamiv(ALfilter*, ALCcontext *context, ALenum param, const ALint*) { alSetError(context, AL_INVALID_ENUM, "Invalid band-pass integer-vector property 0x%04x", param); } void ALbandpass_setParamf(ALfilter *filter, ALCcontext *context, ALenum param, ALfloat val) { @@ -176,9 +176,9 @@ void ALbandpass_setParamf(ALfilter *filter, ALCcontext *context, ALenum param, A void ALbandpass_setParamfv(ALfilter *filter, ALCcontext *context, ALenum param, const ALfloat *vals) { ALbandpass_setParamf(filter, context, param, vals[0]); } -void ALbandpass_getParami(ALfilter *UNUSED(filter), ALCcontext *context, ALenum param, ALint *UNUSED(val)) +void ALbandpass_getParami(ALfilter*, ALCcontext *context, ALenum param, ALint*) { alSetError(context, AL_INVALID_ENUM, "Invalid band-pass integer property 0x%04x", param); } -void ALbandpass_getParamiv(ALfilter *UNUSED(filter), ALCcontext *context, ALenum param, ALint *UNUSED(vals)) +void ALbandpass_getParamiv(ALfilter*, ALCcontext *context, ALenum param, ALint*) { alSetError(context, AL_INVALID_ENUM, "Invalid band-pass integer-vector property 0x%04x", param); } void ALbandpass_getParamf(ALfilter *filter, ALCcontext *context, ALenum param, ALfloat *val) { @@ -206,22 +206,22 @@ void ALbandpass_getParamfv(ALfilter *filter, ALCcontext *context, ALenum param, DEFINE_ALFILTER_VTABLE(ALbandpass); -void ALnullfilter_setParami(ALfilter *UNUSED(filter), ALCcontext *context, ALenum param, ALint UNUSED(val)) +void ALnullfilter_setParami(ALfilter*, ALCcontext *context, ALenum param, ALint) { alSetError(context, AL_INVALID_ENUM, "Invalid null filter property 0x%04x", param); } -void ALnullfilter_setParamiv(ALfilter *UNUSED(filter), ALCcontext *context, ALenum param, const ALint *UNUSED(vals)) +void ALnullfilter_setParamiv(ALfilter*, ALCcontext *context, ALenum param, const ALint*) { alSetError(context, AL_INVALID_ENUM, "Invalid null filter property 0x%04x", param); } -void ALnullfilter_setParamf(ALfilter *UNUSED(filter), ALCcontext *context, ALenum param, ALfloat UNUSED(val)) +void ALnullfilter_setParamf(ALfilter*, ALCcontext *context, ALenum param, ALfloat) { alSetError(context, AL_INVALID_ENUM, "Invalid null filter property 0x%04x", param); } -void ALnullfilter_setParamfv(ALfilter *UNUSED(filter), ALCcontext *context, ALenum param, const ALfloat *UNUSED(vals)) +void ALnullfilter_setParamfv(ALfilter*, ALCcontext *context, ALenum param, const ALfloat*) { alSetError(context, AL_INVALID_ENUM, "Invalid null filter property 0x%04x", param); } -void ALnullfilter_getParami(ALfilter *UNUSED(filter), ALCcontext *context, ALenum param, ALint *UNUSED(val)) +void ALnullfilter_getParami(ALfilter*, ALCcontext *context, ALenum param, ALint*) { alSetError(context, AL_INVALID_ENUM, "Invalid null filter property 0x%04x", param); } -void ALnullfilter_getParamiv(ALfilter *UNUSED(filter), ALCcontext *context, ALenum param, ALint *UNUSED(vals)) +void ALnullfilter_getParamiv(ALfilter*, ALCcontext *context, ALenum param, ALint*) { alSetError(context, AL_INVALID_ENUM, "Invalid null filter property 0x%04x", param); } -void ALnullfilter_getParamf(ALfilter *UNUSED(filter), ALCcontext *context, ALenum param, ALfloat *UNUSED(val)) +void ALnullfilter_getParamf(ALfilter*, ALCcontext *context, ALenum param, ALfloat*) { alSetError(context, AL_INVALID_ENUM, "Invalid null filter property 0x%04x", param); } -void ALnullfilter_getParamfv(ALfilter *UNUSED(filter), ALCcontext *context, ALenum param, ALfloat *UNUSED(vals)) +void ALnullfilter_getParamfv(ALfilter*, ALCcontext *context, ALenum param, ALfloat*) { alSetError(context, AL_INVALID_ENUM, "Invalid null filter property 0x%04x", param); } DEFINE_ALFILTER_VTABLE(ALnullfilter); diff --git a/OpenAL32/alListener.cpp b/OpenAL32/alListener.cpp index 232aba33..419e38ad 100644 --- a/OpenAL32/alListener.cpp +++ b/OpenAL32/alListener.cpp @@ -154,7 +154,7 @@ START_API_FUNC END_API_FUNC -AL_API ALvoid AL_APIENTRY alListeneri(ALenum param, ALint UNUSED(value)) +AL_API ALvoid AL_APIENTRY alListeneri(ALenum param, ALint /*value*/) START_API_FUNC { ContextRef context{GetContextRef()}; diff --git a/router/router.cpp b/router/router.cpp index 5b976e95..e9173a22 100644 --- a/router/router.cpp +++ b/router/router.cpp @@ -25,7 +25,7 @@ FILE *LogFile; static void LoadDriverList(void); -BOOL APIENTRY DllMain(HINSTANCE UNUSED(module), DWORD reason, void* UNUSED(reserved)) +BOOL APIENTRY DllMain(HINSTANCE, DWORD reason, void*) { const char *str; diff --git a/router/router.h b/router/router.h index d2574e74..007b6a16 100644 --- a/router/router.h +++ b/router/router.h @@ -17,18 +17,6 @@ #include "AL/alext.h" -#ifndef UNUSED -#if defined(__cplusplus) -#define UNUSED(x) -#elif defined(__GNUC__) -#define UNUSED(x) UNUSED_##x __attribute__((unused)) -#elif defined(__LCLINT__) -#define UNUSED(x) /*@unused@*/ x -#else -#define UNUSED(x) x -#endif -#endif - #define MAKE_ALC_VER(major, minor) (((major)<<8) | (minor)) struct DriverIface { |