shithub: opus

Download patch

ref: 732ac84452097cf8b0c5749c62229b17ec332aa6
parent: 455993f1e1ab67abb5dbd2071dd2dcdd8119ba6a
author: Ralph Giles <[email protected]>
date: Fri Oct 28 05:27:25 EDT 2011

Move opus_apps inside the MALLOC_FAIL block.

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.

--- a/tests/test_opus_api.c
+++ b/tests/test_opus_api.c
@@ -65,6 +65,10 @@
 #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 @@
 #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)
 {