summaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2013-10-07 08:00:18 -0700
committerChris Robinson <[email protected]>2013-10-07 08:00:18 -0700
commit32e85d469b735260d827d50a6d37c0937d375914 (patch)
treedf741474c8fc9e2c3ed35652a1d837a8baed8763 /Alc
parent1518895e15262deade1b03e29b47a3d149f73c83 (diff)
Use the UNUSED macro in the backends
Diffstat (limited to 'Alc')
-rw-r--r--Alc/backends/dsound.c10
-rw-r--r--Alc/backends/loopback.c12
-rw-r--r--Alc/backends/portaudio.c20
-rw-r--r--Alc/backends/pulseaudio.c32
-rw-r--r--Alc/backends/winmm.c10
5 files changed, 25 insertions, 59 deletions
diff --git a/Alc/backends/dsound.c b/Alc/backends/dsound.c
index be0a373f..9727dd2a 100644
--- a/Alc/backends/dsound.c
+++ b/Alc/backends/dsound.c
@@ -128,7 +128,7 @@ static ALCboolean DSoundLoad(void)
}
-static BOOL CALLBACK DSoundEnumPlaybackDevices(LPGUID guid, LPCSTR desc, LPCSTR drvname, LPVOID data)
+static BOOL CALLBACK DSoundEnumPlaybackDevices(LPGUID guid, LPCSTR desc, LPCSTR UNUSED(drvname), LPVOID UNUSED(data))
{
LPOLESTR guidstr = NULL;
char str[1024];
@@ -137,9 +137,6 @@ static BOOL CALLBACK DSoundEnumPlaybackDevices(LPGUID guid, LPCSTR desc, LPCSTR
int count;
ALuint i;
- (void)data;
- (void)drvname;
-
if(!guid)
return TRUE;
@@ -178,7 +175,7 @@ static BOOL CALLBACK DSoundEnumPlaybackDevices(LPGUID guid, LPCSTR desc, LPCSTR
}
-static BOOL CALLBACK DSoundEnumCaptureDevices(LPGUID guid, LPCSTR desc, LPCSTR drvname, LPVOID data)
+static BOOL CALLBACK DSoundEnumCaptureDevices(LPGUID guid, LPCSTR desc, LPCSTR UNUSED(drvname), LPVOID UNUSED(data))
{
LPOLESTR guidstr = NULL;
char str[1024];
@@ -187,9 +184,6 @@ static BOOL CALLBACK DSoundEnumCaptureDevices(LPGUID guid, LPCSTR desc, LPCSTR d
int count;
ALuint i;
- (void)data;
- (void)drvname;
-
if(!guid)
return TRUE;
diff --git a/Alc/backends/loopback.c b/Alc/backends/loopback.c
index e1bdd3c1..067e23d1 100644
--- a/Alc/backends/loopback.c
+++ b/Alc/backends/loopback.c
@@ -32,9 +32,8 @@ static ALCenum loopback_open_playback(ALCdevice *device, const ALCchar *deviceNa
return ALC_NO_ERROR;
}
-static void loopback_close_playback(ALCdevice *device)
+static void loopback_close_playback(ALCdevice *UNUSED(device))
{
- (void)device;
}
static ALCboolean loopback_reset_playback(ALCdevice *device)
@@ -43,15 +42,13 @@ static ALCboolean loopback_reset_playback(ALCdevice *device)
return ALC_TRUE;
}
-static ALCboolean loopback_start_playback(ALCdevice *device)
+static ALCboolean loopback_start_playback(ALCdevice *UNUSED(device))
{
return ALC_TRUE;
- (void)device;
}
-static void loopback_stop_playback(ALCdevice *device)
+static void loopback_stop_playback(ALCdevice *UNUSED(device))
{
- (void)device;
}
@@ -82,7 +79,6 @@ void alc_loopback_deinit(void)
{
}
-void alc_loopback_probe(enum DevProbe type)
+void alc_loopback_probe(enum DevProbe UNUSED(type))
{
- (void)type;
}
diff --git a/Alc/backends/portaudio.c b/Alc/backends/portaudio.c
index 94311134..2009beb3 100644
--- a/Alc/backends/portaudio.c
+++ b/Alc/backends/portaudio.c
@@ -127,31 +127,23 @@ typedef struct {
} pa_data;
-static int pa_callback(const void *inputBuffer, void *outputBuffer,
- unsigned long framesPerBuffer, const PaStreamCallbackTimeInfo *timeInfo,
- const PaStreamCallbackFlags statusFlags, void *userData)
+static int pa_callback(const void *UNUSED(inputBuffer), void *outputBuffer,
+ unsigned long framesPerBuffer, const PaStreamCallbackTimeInfo *UNUSED(timeInfo),
+ const PaStreamCallbackFlags UNUSED(statusFlags), void *userData)
{
ALCdevice *device = (ALCdevice*)userData;
- (void)inputBuffer;
- (void)timeInfo;
- (void)statusFlags;
-
aluMixData(device, outputBuffer, framesPerBuffer);
return 0;
}
-static int pa_capture_cb(const void *inputBuffer, void *outputBuffer,
- unsigned long framesPerBuffer, const PaStreamCallbackTimeInfo *timeInfo,
- const PaStreamCallbackFlags statusFlags, void *userData)
+static int pa_capture_cb(const void *inputBuffer, void *UNUSED(outputBuffer),
+ unsigned long framesPerBuffer, const PaStreamCallbackTimeInfo *UNUSED(timeInfo),
+ const PaStreamCallbackFlags UNUSED(statusFlags), void *userData)
{
ALCdevice *device = (ALCdevice*)userData;
pa_data *data = (pa_data*)device->ExtraData;
- (void)outputBuffer;
- (void)timeInfo;
- (void)statusFlags;
-
WriteRingBuffer(data->ring, inputBuffer, framesPerBuffer);
return 0;
}
diff --git a/Alc/backends/pulseaudio.c b/Alc/backends/pulseaudio.c
index 41880a9e..f96b44fe 100644
--- a/Alc/backends/pulseaudio.c
+++ b/Alc/backends/pulseaudio.c
@@ -392,17 +392,15 @@ static void stream_state_callback2(pa_stream *stream, void *pdata)
pa_threaded_mainloop_signal(data->loop, 0);
}
-static void stream_success_callback(pa_stream *stream, int success, void *pdata)
+static void stream_success_callback(pa_stream *UNUSED(stream), int UNUSED(success), void *pdata)
{
ALCdevice *Device = pdata;
pulse_data *data = Device->ExtraData;
- (void)stream;
- (void)success;
pa_threaded_mainloop_signal(data->loop, 0);
}
-static void sink_info_callback(pa_context *context, const pa_sink_info *info, int eol, void *pdata)
+static void sink_info_callback(pa_context *UNUSED(context), const pa_sink_info *info, int eol, void *pdata)
{
ALCdevice *device = pdata;
pulse_data *data = device->ExtraData;
@@ -425,7 +423,6 @@ static void sink_info_callback(pa_context *context, const pa_sink_info *info, in
{ NULL, 0 }
};
int i;
- (void)context;
if(eol)
{
@@ -455,14 +452,12 @@ static void sink_info_callback(pa_context *context, const pa_sink_info *info, in
ERR("Failed to find format for channel map:\n %s\n", chanmap_str);
}
-static void sink_device_callback(pa_context *context, const pa_sink_info *info, int eol, void *pdata)
+static void sink_device_callback(pa_context *UNUSED(context), const pa_sink_info *info, int eol, void *pdata)
{
pa_threaded_mainloop *loop = pdata;
void *temp;
ALuint i;
- (void)context;
-
if(eol)
{
pa_threaded_mainloop_signal(loop, 0);
@@ -487,14 +482,12 @@ static void sink_device_callback(pa_context *context, const pa_sink_info *info,
}
}
-static void source_device_callback(pa_context *context, const pa_source_info *info, int eol, void *pdata)
+static void source_device_callback(pa_context *UNUSED(context), const pa_source_info *info, int eol, void *pdata)
{
pa_threaded_mainloop *loop = pdata;
void *temp;
ALuint i;
- (void)context;
-
if(eol)
{
pa_threaded_mainloop_signal(loop, 0);
@@ -519,11 +512,10 @@ static void source_device_callback(pa_context *context, const pa_source_info *in
}
}
-static void sink_name_callback(pa_context *context, const pa_sink_info *info, int eol, void *pdata)
+static void sink_name_callback(pa_context *UNUSED(context), const pa_sink_info *info, int eol, void *pdata)
{
ALCdevice *device = pdata;
pulse_data *data = device->ExtraData;
- (void)context;
if(eol)
{
@@ -535,11 +527,10 @@ static void sink_name_callback(pa_context *context, const pa_sink_info *info, in
device->DeviceName = strdup(info->description);
}
-static void source_name_callback(pa_context *context, const pa_source_info *info, int eol, void *pdata)
+static void source_name_callback(pa_context *UNUSED(context), const pa_source_info *info, int eol, void *pdata)
{
ALCdevice *device = pdata;
pulse_data *data = device->ExtraData;
- (void)context;
if(eol)
{
@@ -556,10 +547,9 @@ static void stream_moved_callback(pa_stream *stream, void *pdata)
{
ALCdevice *device = pdata;
pulse_data *data = device->ExtraData;
- (void)stream;
free(data->device_name);
- data->device_name = strdup(pa_stream_get_device_name(data->stream));
+ data->device_name = strdup(pa_stream_get_device_name(stream));
TRACE("Stream moved to %s\n", data->device_name);
}
@@ -1568,13 +1558,13 @@ void alc_pulse_probe(enum DevProbe type)
#warning "Unsupported API version, backend will be unavailable!"
-ALCboolean alc_pulse_init(BackendFuncs *func_list)
-{ return ALC_FALSE; (void)func_list; }
+ALCboolean alc_pulse_init(BackendFuncs *UNUSED(func_list))
+{ return ALC_FALSE; }
void alc_pulse_deinit(void)
{ }
-void alc_pulse_probe(enum DevProbe type)
-{ (void)type; }
+void alc_pulse_probe(enum DevProbe UNUSED(type))
+{ }
#endif
diff --git a/Alc/backends/winmm.c b/Alc/backends/winmm.c
index 4786d9b4..3b2b373b 100644
--- a/Alc/backends/winmm.c
+++ b/Alc/backends/winmm.c
@@ -146,14 +146,11 @@ static void ProbeCaptureDevices(void)
Posts a message to 'PlaybackThreadProc' everytime a WaveOut Buffer is completed and
returns to the application (for more data)
*/
-static void CALLBACK WaveOutProc(HWAVEOUT device, UINT msg, DWORD_PTR instance, DWORD_PTR param1, DWORD_PTR param2)
+static void CALLBACK WaveOutProc(HWAVEOUT UNUSED(device), UINT msg, DWORD_PTR instance, DWORD_PTR param1, DWORD_PTR UNUSED(param2))
{
ALCdevice *Device = (ALCdevice*)instance;
WinMMData *data = Device->ExtraData;
- (void)device;
- (void)param2;
-
if(msg != WOM_DONE)
return;
@@ -213,14 +210,11 @@ static DWORD WINAPI PlaybackThreadProc(LPVOID param)
Posts a message to 'CaptureThreadProc' everytime a WaveIn Buffer is completed and
returns to the application (with more data)
*/
-static void CALLBACK WaveInProc(HWAVEIN device, UINT msg, DWORD_PTR instance, DWORD_PTR param1, DWORD_PTR param2)
+static void CALLBACK WaveInProc(HWAVEIN UNUSED(device), UINT msg, DWORD_PTR instance, DWORD_PTR param1, DWORD_PTR UNUSED(param2))
{
ALCdevice *Device = (ALCdevice*)instance;
WinMMData *data = Device->ExtraData;
- (void)device;
- (void)param2;
-
if(msg != WIM_DATA)
return;