Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.xiph.org/xiph/opus.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRalph Giles <giles@thaumas.net>2011-10-28 21:51:17 +0400
committerRalph Giles <giles@thaumas.net>2011-10-28 21:51:17 +0400
commitb4dd4eb7809f5635bcd432beb2f58d18757db3df (patch)
treee01227b4e1ef32e897dbdb408e46b9950fab4a80 /tests/test_opus_api.c
parent732ac84452097cf8b0c5749c62229b17ec332aa6 (diff)
Fix the test for gcc version >= 4.6 to work for gcc 5 and up.
We use the __GNUC_PREREQ macro from celt/arch.h to check the required minimum gcc version. The previous check would have failed for gcc 5.n with n from 0 to 5. Thanks to pcgod for pointing out the problem and derf for pointing out we had a macro for this.
Diffstat (limited to 'tests/test_opus_api.c')
-rw-r--r--tests/test_opus_api.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/test_opus_api.c b/tests/test_opus_api.c
index 1bc26ff0..76ae3b16 100644
--- a/tests/test_opus_api.c
+++ b/tests/test_opus_api.c
@@ -49,6 +49,7 @@
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
+#include "arch.h"
#include "../include/opus.h"
#include "test_opus_common.h"
@@ -1167,7 +1168,7 @@ int test_repacketizer_api(void)
* handling in our codebase, and the lack of thread saftey isn't an
* issue here. We therefore disable the warning for this function.
*/
-#if defined(__GNUC__) && __GNUC__ >= 4 && __GNUC_MINOR__ >= 6
+#if defined(__GNUC_PREREQ) && __GNUC_PREREQ(4,6)
/* Save the current warning settings */
#pragma GCC diagnostic push
#endif
@@ -1259,7 +1260,7 @@ int test_malloc_fail(void)
}
#ifdef MALLOC_FAIL
-#if defined(__GNUC__) && __GNUC__ >= 4 && __GNUC_MINOR__ >= 6
+#if defined(__GNUC_PREREQ) && __GNUC_PREREQ(4,6)
/* Restore the previous warning settings */
#pragma GCC diagnostic pop /* restore -Wdeprecated-declarations */
#endif