From b04691b3e8e62bd105f0f4d8d3b9e7da187f0c90 Mon Sep 17 00:00:00 2001 From: Thomas Wood Date: Tue, 8 Sep 2015 11:16:46 +0100 Subject: [PATCH] tests/gem_pwrite_snooped: disable const cast warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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ä Signed-off-by: Thomas Wood --- 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 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++; }