public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Thomas Wood <thomas.wood@intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH i-g-t] tests/gem_pwrite_snooped: disable const cast warning
Date: Tue,  8 Sep 2015 11:25:52 +0100	[thread overview]
Message-ID: <1441707952-14965-1-git-send-email-thomas.wood@intel.com> (raw)
In-Reply-To: <20150907151836.GA29811@intel.com>

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(+)

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@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2015-09-08 10:35 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-07 11:34 [PATCH i-g-t 1/2] build: fix unused-result warnings Thomas Wood
2015-09-07 11:34 ` [PATCH i-g-t 2/2] tests/gem_pwrite_snooped: fix const cast warning Thomas Wood
2015-09-07 12:51   ` Ville Syrjälä
2015-09-07 12:53   ` Ville Syrjälä
2015-09-07 14:49     ` Thomas Wood
2015-09-07 15:18       ` Ville Syrjälä
2015-09-08 10:25         ` Thomas Wood [this message]
2015-09-09 18:19 ` [PATCH i-g-t 1/2] build: fix unused-result warnings Zanoni, Paulo R
2015-09-10 10:47   ` [PATCH i-g-t] lib: don't use igt_warn in signal handlers Thomas Wood

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1441707952-14965-1-git-send-email-thomas.wood@intel.com \
    --to=thomas.wood@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox