aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
authorJose Fonseca <[email protected]>2015-03-24 19:01:46 +0000
committerJose Fonseca <[email protected]>2015-03-25 10:42:43 +0000
commitcb88edbd4e9cb198013129a360cb3d4163ac3837 (patch)
tree4b8f04af028ffb7e8a14957acd24715027ee6cb0 /src/mesa/main
parentfdb507e3d6a9a78f8a42bc8d6f7e60816627403e (diff)
mesa: Avoid MSVC C6334 warning in /analyze mode.
MSVC's implementation of signbit(x) uses sizeof(x) with expressions to dispatch to an internal function based on the argument's type (float, double, etc), but that raises a flag with MSVC's own static analyzer, and because this is an inline function in a header it causes substantial warning spam. Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/macros.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mesa/main/macros.h b/src/mesa/main/macros.h
index 2d7a6a107fd..3344ec84169 100644
--- a/src/mesa/main/macros.h
+++ b/src/mesa/main/macros.h
@@ -789,7 +789,14 @@ NORMALIZE_3FV(GLfloat v[3])
static inline GLboolean
DIFFERENT_SIGNS(GLfloat x, GLfloat y)
{
+#ifdef _MSC_VER
+#pragma warning( push )
+#pragma warning( disable : 6334 ) /* sizeof operator applied to an expression with an operator may yield unexpected results */
+#endif
return signbit(x) != signbit(y);
+#ifdef _MSC_VER
+#pragma warning( pop )
+#endif
}