summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJose Fonseca <[email protected]>2015-03-24 19:56:21 +0000
committerJose Fonseca <[email protected]>2015-03-25 10:42:48 +0000
commit25d6cdd2ff1f00e0eab532956c0ae17d4ffa42da (patch)
tree1232f351cc1658d5bbdd69bc4522305c9355530c /src
parent28c54400af1ee04306342f67e56dc9e37933c538 (diff)
util/u_atomic: Ignore warnings interlocked accesses.
These are due how we implemented the atomic tests, not the atomic implementation itself. It's also difficult to refactor the code to avoid the warnings due to the use of macros -- the code would be quite hairy. Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/util/u_atomic_test.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/util/u_atomic_test.c b/src/util/u_atomic_test.c
index 939cfe44577..7844f616222 100644
--- a/src/util/u_atomic_test.c
+++ b/src/util/u_atomic_test.c
@@ -36,6 +36,11 @@
#include "u_atomic.h"
+#ifdef _MSC_VER
+#pragma warning( disable : 28112 ) /* Accessing a local variable via an Interlocked function */
+#pragma warning( disable : 28113 ) /* A variable which is accessed via an Interlocked function must always be accessed via an Interlocked function */
+#endif
+
/* Test only assignment-like operations, which are supported on all types */
#define test_atomic_assign(type, ones) \