From 732ac84452097cf8b0c5749c62229b17ec332aa6 Mon Sep 17 00:00:00 2001
From: Ralph Giles <giles@mozilla.com>
Date: Fri, 28 Oct 2011 09:27:25 -0700
Subject: [PATCH] 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.
---
 tests/test_opus_api.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/tests/test_opus_api.c b/tests/test_opus_api.c
index cab39aaed..1bc26ff0e 100644
--- 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 @@ 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)
 {
-- 
GitLab