shithub: opus

Download patch

ref: 1a458862e3d58d965e9758b8594ddd076eebb5db
parent: 09c67660129f91f9a11e68589b5e96af290cbf5f
author: Timothy B. Terriberry <[email protected]>
date: Wed May 4 11:03:30 EDT 2011

Disable parentheses warnings automatically.

This ensures we don't have to rely on build-system support for
 disabling these warnings in libcelt.

--- a/libcelt/arch.h
+++ b/libcelt/arch.h
@@ -36,6 +36,22 @@
 
 #include "celt_types.h"
 
+# if !defined(__GNUC_PREREQ)
+#  if defined(__GNUC__)&&defined(__GNUC_MINOR__)
+#   define __GNUC_PREREQ(_maj,_min) \
+ ((__GNUC__<<16)+__GNUC_MINOR__>=((_maj)<<16)+(_min))
+#  else
+#   define __GNUC_PREREQ(_maj,_min) 0
+#  endif
+# endif
+
+# if defined(_MSC_VER)
+#  pragma warning(disable:4554)
+# endif
+# if __GNUC_PREREQ(4,2)
+#  pragma GCC diagnostic ignored "-Wparentheses"
+# endif
+
 #define CELT_SIG_SCALE 32768.f
 
 #define celt_fatal(str) _celt_fatal(str, __FILE__, __LINE__);
--- a/libcelt/entcode.c
+++ b/libcelt/entcode.c
@@ -30,6 +30,7 @@
 #endif
 
 #include "entcode.h"
+#include "arch.h"