Move opus_apps inside the MALLOC_FAIL block.
authorRalph Giles <giles@mozilla.com>
Fri, 28 Oct 2011 16:27:25 +0000 (09:27 -0700)
committerRalph Giles <giles@mozilla.com>
Fri, 28 Oct 2011 17:26:20 +0000 (10:26 -0700)
This array is only used by the malloc failure test, and
defining it unconditionally creates an unused variable
warning on platforms where MALLOC_FAIL isn't set.

tests/test_opus_api.c

index cab39aa..1bc26ff 100644 (file)
 #define MALLOC_FAIL
 #include "os_support.h"
 #include <malloc.h>
+
+static const opus_int32 opus_apps[3] = {OPUS_APPLICATION_VOIP,
+       OPUS_APPLICATION_AUDIO,OPUS_APPLICATION_RESTRICTED_LOWDELAY};
+
 void *malloc_hook(__attribute__((unused)) size_t size,
                   __attribute__((unused)) const void *caller)
 {
@@ -73,8 +77,6 @@ void *malloc_hook(__attribute__((unused)) size_t size,
 #endif
 
 static const opus_int32 opus_rates[5] = {48000,24000,16000,12000,8000};
-static const opus_int32 opus_apps[3] = {OPUS_APPLICATION_VOIP,
-       OPUS_APPLICATION_AUDIO,OPUS_APPLICATION_RESTRICTED_LOWDELAY};
 
 opus_int32 test_dec_api(void)
 {