Message ID | 1441707952-14965-1-git-send-email-thomas.wood@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/tests/gem_pwrite_snooped.c b/tests/gem_pwrite_snooped.c index d3f6223..3bc4bad 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++; }
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> --- tests/gem_pwrite_snooped.c | 3 +++ 1 file changed, 3 insertions(+)