mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 10:14:52 +00:00
dix: AllocGlyphCursor(): make color parameters unsigned short
These values are assigned to `unsigned short` fields, and we're only getting in smaller numbers that fit well into it. So fixing compiler warning on type size mismatch by using short args. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
committed by
Enrico Weigelt
parent
9856372932
commit
bb591fb1fd
10
dix/cursor.c
10
dix/cursor.c
@@ -317,9 +317,9 @@ AllocARGBCursor(unsigned char *psrcbits, unsigned char *pmaskbits,
|
||||
}
|
||||
|
||||
int
|
||||
AllocGlyphCursor(Font source, unsigned sourceChar, Font mask, unsigned maskChar,
|
||||
unsigned foreRed, unsigned foreGreen, unsigned foreBlue,
|
||||
unsigned backRed, unsigned backGreen, unsigned backBlue,
|
||||
AllocGlyphCursor(Font source, unsigned short sourceChar, Font mask, unsigned short maskChar,
|
||||
unsigned short foreRed, unsigned short foreGreen, unsigned short foreBlue,
|
||||
unsigned short backRed, unsigned short backGreen, unsigned short backBlue,
|
||||
CursorPtr *ppCurs, ClientPtr client, XID cid)
|
||||
{
|
||||
FontPtr sourcefont, maskfont;
|
||||
@@ -374,7 +374,7 @@ AllocGlyphCursor(Font source, unsigned sourceChar, Font mask, unsigned maskChar,
|
||||
if (!mskptr)
|
||||
return BadAlloc;
|
||||
while (--n >= 0)
|
||||
*mskptr++ = ~0;
|
||||
*mskptr++ = (unsigned char)~0U;
|
||||
}
|
||||
else {
|
||||
if (!CursorMetricsFromGlyph(maskfont, maskChar, &cm)) {
|
||||
@@ -501,7 +501,7 @@ CreateRootCursor(void)
|
||||
serverClient, DixReadAccess);
|
||||
if (err != Success)
|
||||
return NullCursor;
|
||||
if (AllocGlyphCursor(fontID, 0, fontID, 1, 0, 0, 0, ~0, ~0, ~0,
|
||||
if (AllocGlyphCursor(fontID, 0, fontID, 1, 0, 0, 0, (unsigned short)~0U, (unsigned short)~0U, (unsigned short)~0U,
|
||||
&curs, serverClient, (XID) 0) != Success)
|
||||
return NullCursor;
|
||||
|
||||
|
||||
@@ -38,15 +38,15 @@ int AllocARGBCursor(unsigned char *psrcbits,
|
||||
XID cid);
|
||||
|
||||
int AllocGlyphCursor(Font source,
|
||||
unsigned int sourceChar,
|
||||
unsigned short sourceChar,
|
||||
Font mask,
|
||||
unsigned int maskChar,
|
||||
unsigned foreRed,
|
||||
unsigned foreGreen,
|
||||
unsigned foreBlue,
|
||||
unsigned backRed,
|
||||
unsigned backGreen,
|
||||
unsigned backBlue,
|
||||
unsigned short maskChar,
|
||||
unsigned short foreRed,
|
||||
unsigned short foreGreen,
|
||||
unsigned short foreBlue,
|
||||
unsigned short backRed,
|
||||
unsigned short backGreen,
|
||||
unsigned short backBlue,
|
||||
CursorPtr *ppCurs,
|
||||
ClientPtr client,
|
||||
XID cid);
|
||||
|
||||
Reference in New Issue
Block a user