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@xxxxxxxxxxxxxxx> Signed-off-by: Thomas Wood <thomas.wood@xxxxxxxxx> --- tests/gem_pwrite_snooped.c | 3 +++ 1 file changed, 3 insertions(+) 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++; } -- 1.9.1 _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/intel-gfx