summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2011-05-22 12:55:31 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2011-05-22 12:55:31 -0700
commit4ce23fcd978ed389ea30315c0e02629a31bda265 (patch)
treebbbc02e34efb66bc6ae243c7a1c1304abc335929 /src
parent047993c76a677ca12a2b575990b99e3ddbc0dd58 (diff)
downloadxorg-lib-libXcursor-4ce23fcd978ed389ea30315c0e02629a31bda265.tar.gz
Mark bitmasks as unsigned ints
Clears Sun compiler warnings from shifting 8 bits by 24 bits: "cursor.c", line 215: warning: integer overflow detected: op "<<" "cursor.c", line 280: warning: integer overflow detected: op "<<" Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'src')
-rw-r--r--src/cursor.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cursor.c b/src/cursor.c
index 3de3c8e..7da62ef 100644
--- a/src/cursor.c
+++ b/src/cursor.c
@@ -212,7 +212,7 @@ _XcursorAverageColor (XcursorPixel *pixels, int npixels)
green += (p >> 8) & 0xff;
blue += (p >> 0) & 0xff;
}
- return (0xff << 24) | ((red/npixels) << 16) | ((green/npixels) << 8) | (blue/npixels);
+ return (0xffU << 24) | ((red/npixels) << 16) | ((green/npixels) << 8) | (blue/npixels);
}
typedef struct XcursorCoreCursor {
@@ -277,7 +277,7 @@ _XcursorHeckbertMedianCut (const XcursorImage *image, XcursorCoreCursor *core)
if (green > max_green) max_green = green;
if (blue < min_blue) min_blue = blue;
if (blue > max_blue) max_blue = blue;
- p = ((0xff << 24) | (red << 16) |
+ p = ((0xffU << 24) | (red << 16) |
(green << 8) | (blue << 0));
*pc++ = p;
}