mirror of
https://gitlab.freedesktop.org/xorg/lib/libxcursor.git
synced 2026-01-04 04:00:16 +01:00
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>
This commit is contained in:
parent
047993c76a
commit
4ce23fcd97
1 changed files with 2 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue