From e7c06719510940898e1f7f8215f4137202611308 Mon Sep 17 00:00:00 2001 From: Thilo Schulz Date: Fri, 29 Jul 2011 12:27:00 +0000 Subject: Bug 5094 - Code cleanup, patch by Zack Middleton and DevHC. Fixes unused-but-set gcc warnings --- src/client/snd_openal.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'src/client/snd_openal.c') 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; } -- cgit