From a449d5950ed134cb227500ce8ad8c246ec04867f Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Mon, 15 Sep 2025 17:36:08 +0200 Subject: [PATCH] dix: AllocARGBCursor(): 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 --- dix/cursor.c | 4 ++-- dix/cursor_priv.h | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/dix/cursor.c b/dix/cursor.c index c654e5aa0..b92f84750 100644 --- a/dix/cursor.c +++ b/dix/cursor.c @@ -232,8 +232,8 @@ RealizeCursorAllScreens(CursorPtr pCurs) int AllocARGBCursor(unsigned char *psrcbits, unsigned char *pmaskbits, CARD32 *argb, CursorMetricPtr cm, - unsigned foreRed, unsigned foreGreen, unsigned foreBlue, - unsigned backRed, unsigned backGreen, unsigned backBlue, + unsigned short foreRed, unsigned short foreGreen, unsigned short foreBlue, + unsigned short backRed, unsigned short backGreen, unsigned short backBlue, CursorPtr *ppCurs, ClientPtr client, XID cid) { CursorBitsPtr bits; diff --git a/dix/cursor_priv.h b/dix/cursor_priv.h index 58048aea9..ebf293ae0 100644 --- a/dix/cursor_priv.h +++ b/dix/cursor_priv.h @@ -27,12 +27,12 @@ int AllocARGBCursor(unsigned char *psrcbits, unsigned char *pmaskbits, CARD32 *argb, CursorMetricPtr cm, - unsigned foreRed, - unsigned foreGreen, - unsigned foreBlue, - unsigned backRed, - unsigned backGreen, - unsigned backBlue, + unsigned short foreRed, + unsigned short foreGreen, + unsigned short foreBlue, + unsigned short backRed, + unsigned short backGreen, + unsigned short backBlue, CursorPtr *ppCurs, ClientPtr client, XID cid);