[Mesa-dev] [PATCH 8/8] util/u_atomic: Ignore warnings interlocked accesses.
Brian Paul
brianp at vmware.com
Tue Mar 24 15:42:34 PDT 2015
On 03/24/2015 03:16 PM, Jose Fonseca wrote:
> 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.
> ---
> src/util/u_atomic_test.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/src/util/u_atomic_test.c b/src/util/u_atomic_test.c
> index 939cfe4..7844f61 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) \
>
Series looks OK to me.
Reviewed-by: Brian Paul <brianp at vmware.com>
More information about the mesa-dev
mailing list