public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Thomas Wood <thomas.wood@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH i-g-t 2/2] tests/gem_pwrite_snooped: fix const cast warning
Date: Mon, 7 Sep 2015 15:53:40 +0300	[thread overview]
Message-ID: <20150907125340.GY29811@intel.com> (raw)
In-Reply-To: <1441625652-5233-2-git-send-email-thomas.wood@intel.com>

On Mon, Sep 07, 2015 at 12:34:12PM +0100, Thomas Wood wrote:
> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
> ---
>  tests/gem_pwrite_snooped.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/gem_pwrite_snooped.c b/tests/gem_pwrite_snooped.c
> index d3f6223..29142c3 100644
> --- a/tests/gem_pwrite_snooped.c
> +++ b/tests/gem_pwrite_snooped.c
> @@ -76,14 +76,14 @@ static void blit(drm_intel_bo *dst, drm_intel_bo *src,
>  	intel_batchbuffer_free(batch);
>  }
>  
> -static void *memchr_inv(const void *s, int c, size_t n)
> +static void const *memchr_inv(const void *s, int c, size_t n)

Oh, and I'll just note that I wrote it the way I did orignally so that
it matches memchr(). But I suppose matching memchr() exactly is not all
that important.

>  {
>  	const unsigned char *us = s;
>  	unsigned char uc = c;
>  
>  	while (n--) {
>  		if (*us != uc)
> -			return (void *) us;
> +			return (void const *) us;
>  		us++;
>  	}
>  
> -- 
> 1.9.1
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2015-09-07 12:53 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ä [this message]
2015-09-07 14:49     ` Thomas Wood
2015-09-07 15:18       ` Ville Syrjälä
2015-09-08 10:25         ` [PATCH i-g-t] tests/gem_pwrite_snooped: disable " Thomas Wood
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=20150907125340.GY29811@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=thomas.wood@intel.com \
    /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