tests/gem_pwrite_snooped: disable const cast warning

Disable -Wcast-qual temporarily to allow memchr_inv to return non-const
data (similar to memchr), without causing a compiler warning.

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
This commit is contained in:
Thomas Wood 2015-09-08 11:16:46 +01:00
parent 84cfa9e4d2
commit b04691b3e8

View File

@ -83,7 +83,10 @@ static void *memchr_inv(const void *s, int c, size_t n)
while (n--) {
if (*us != uc)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wcast-qual"
return (void *) us;
#pragma GCC diagnostic pop
us++;
}