Skip to content
Snippets Groups Projects
Commit b4dd4eb7 authored by Ralph Giles's avatar Ralph Giles
Browse files

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.
parent 732ac844
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment