Disable excessive warnings about parentheses.
authorTimothy B. Terriberry <tterribe@xiph.org>
Tue, 9 Oct 2012 01:02:32 +0000 (18:02 -0700)
committerTimothy B. Terriberry <tterribe@xiph.org>
Tue, 9 Oct 2012 01:02:32 +0000 (18:02 -0700)
Doing this in the source keeps them disabled when someone doesn't
 use one of our build systems.

src/internal.h

index 1aad90e..fc87a22 100644 (file)
@@ -38,6 +38,13 @@ typedef opus_int16 op_sample;
 typedef float      op_sample;
 # endif
 
+/*Disable excessive warnings about the order of operations.*/
+# if OP_GNUC_PREREQ(4,2)
+#  pragma GCC diagnostic ignored "-Wparentheses"
+# elif defined(_MSC_VER)
+#  pragma warning(disable:4554)
+# endif
+
 # if OP_GNUC_PREREQ(3,0)
 /*Another alternative is
     (__builtin_constant_p(_x)?!!(_x):__builtin_expect(!!(_x),1))