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

Adam Jackson ajax at redhat.com
Mon Mar 10 08:04:31 PDT 2014


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>
---
 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