[PATCH 07/10] fb: Fix a pointer type

Mark Kettenis mark.kettenis at xs4all.nl
Mon Mar 10 08:52:37 PDT 2014


> From: Adam Jackson <ajax at redhat.com>
> Date: Mon, 10 Mar 2014 11:04:31 -0400
> 
> When FB_SHIFT == 6:
> 
> fbbltone.c: In function 'fbBltOne':
> fbbltone.c:185:12: warning: assignment from incompatible pointer type
> [enabled by default]
>      srcEnd = src + height * srcStride;
>             ^
> fbbltone.c:284:49: warning: comparison of distinct pointer types lacks a
> cast [enabled by default]
>              LoadBits;
>                                                  ^
> (etc.)
> 
> srcEnd is hidden in the macro expansion of LoadBits.  src is FbStip *,
> srcEnd should be too.
> 
> Signed-off-by: Adam Jackson <ajax at redhat.com>

Reviewed-by: Mark Kettenis <kettenis at openbsd.org>

> ---
>  fb/fbbltone.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fb/fbbltone.c b/fb/fbbltone.c
> index bfcb5a2..434d447 100644
> --- a/fb/fbbltone.c
> +++ b/fb/fbbltone.c
> @@ -153,7 +153,7 @@ fbBltOne(FbStip * src, FbStride srcStride,      /* FbStip units per scanline */
>           FbBits fgxor, FbBits bgand, FbBits bgxor)
>  {
>      const FbBits *fbBits;
> -    FbBits *srcEnd;
> +    FbStip *srcEnd;
>      int pixelsPerDst;           /* dst pixels per FbBits */
>      int unitsPerSrc;            /* src patterns per FbStip */
>      int leftShift, rightShift;  /* align source with dest */
> -- 
> 1.8.5.3


More information about the xorg-devel mailing list