summaryrefslogtreecommitdiff
path: root/src/client/snd_openal.c
diff options
context:
space:
mode:
authorThilo Schulz <arny@ats.s.bawue.de>2011-07-29 12:27:00 +0000
committerTim Angus <tim@ngus.net>2013-01-10 22:36:34 +0000
commite7c06719510940898e1f7f8215f4137202611308 (patch)
tree0aec0bf91daa568d8cb4a1c412037ca26b2f92a6 /src/client/snd_openal.c
parent76544bcec46127587d183a90e5ff817a71e1f139 (diff)
Bug 5094 - Code cleanup, patch by Zack Middleton and DevHC. Fixes unused-but-set gcc warnings
Diffstat (limited to 'src/client/snd_openal.c')
-rw-r--r--src/client/snd_openal.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/client/snd_openal.c b/src/client/snd_openal.c
index 660525dd..28a7d2ee 100644
--- a/src/client/snd_openal.c
+++ b/src/client/snd_openal.c
@@ -246,8 +246,6 @@ S_AL_BufferUnload
*/
static void S_AL_BufferUnload(sfxHandle_t sfx)
{
- ALenum error;
-
if(knownSfx[sfx].filename[0] == '\0')
return;
@@ -257,7 +255,7 @@ static void S_AL_BufferUnload(sfxHandle_t sfx)
// Delete it
S_AL_ClearError( qfalse );
qalDeleteBuffers(1, &knownSfx[sfx].buffer);
- if((error = qalGetError()) != AL_NO_ERROR)
+ if(qalGetError() != AL_NO_ERROR)
Com_Printf( S_COLOR_RED "ERROR: Can't delete sound buffer for %s\n",
knownSfx[sfx].filename);
@@ -692,7 +690,6 @@ qboolean S_AL_SrcInit( void )
{
int i;
int limit;
- ALenum error;
// Clear the sources data structure
memset(srcList, 0, sizeof(srcList));
@@ -711,7 +708,7 @@ qboolean S_AL_SrcInit( void )
for(i = 0; i < limit; i++)
{
qalGenSources(1, &srcList[i].alSource);
- if((error = qalGetError()) != AL_NO_ERROR)
+ if(qalGetError() != AL_NO_ERROR)
break;
srcCount++;
}
@@ -2459,20 +2456,26 @@ qboolean S_AL_Init( soundInterface_t *si )
{
char devicenames[16384] = "";
const char *devicelist;
+#ifdef _WIN32
const char *defaultdevice;
+#endif
int curlen;
// get all available devices + the default device name.
if(enumeration_all_ext)
{
devicelist = qalcGetString(NULL, ALC_ALL_DEVICES_SPECIFIER);
+#ifdef _WIN32
defaultdevice = qalcGetString(NULL, ALC_DEFAULT_ALL_DEVICES_SPECIFIER);
+#endif
}
else
{
// We don't have ALC_ENUMERATE_ALL_EXT but normal enumeration.
devicelist = qalcGetString(NULL, ALC_DEVICE_SPECIFIER);
+#ifdef _WIN32
defaultdevice = qalcGetString(NULL, ALC_DEFAULT_DEVICE_SPECIFIER);
+#endif
enumeration_ext = qtrue;
}