diff options
author | Thomas Wood <thomas.wood@intel.com> | 2015-09-08 11:16:46 +0100 |
---|---|---|
committer | Thomas Wood <thomas.wood@intel.com> | 2015-09-08 16:15:16 +0100 |
commit | b04691b3e8e62bd105f0f4d8d3b9e7da187f0c90 (patch) | |
tree | a8171577058b3f2a947ac0db7fe9a05040336009 /tests | |
parent | 84cfa9e4d271dddd4211ed9a3b94549934fa8819 (diff) |
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>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/gem_pwrite_snooped.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/gem_pwrite_snooped.c b/tests/gem_pwrite_snooped.c index d3f6223e..3bc4bad1 100644 --- a/tests/gem_pwrite_snooped.c +++ b/tests/gem_pwrite_snooped.c @@ -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++; } |