mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-29 19:40:08 +01:00
kdrive/linux: Fix compilation with -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast
Reported-by: Arkadiusz Miśkiewicz <arekm@maven.pl>
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
(cherry picked from commit 1deede3c48)
This commit is contained in:
parent
723eab982a
commit
1ee6e300bd
3 changed files with 7 additions and 7 deletions
|
|
@ -692,7 +692,7 @@ LinuxKeyboardEnable (KdKeyboardInfo *ki)
|
|||
return !Success;
|
||||
|
||||
fd = LinuxConsoleFd;
|
||||
ki->driverPrivate = (void *) fd;
|
||||
ki->driverPrivate = (void *) (intptr_t) fd;
|
||||
|
||||
ioctl (fd, KDGKBMODE, &LinuxKbdTrans);
|
||||
tcgetattr (fd, &LinuxTermios);
|
||||
|
|
@ -724,7 +724,7 @@ LinuxKeyboardDisable (KdKeyboardInfo *ki)
|
|||
if (!ki)
|
||||
return;
|
||||
|
||||
fd = (int) ki->driverPrivate;
|
||||
fd = (int) (intptr_t) ki->driverPrivate;
|
||||
|
||||
KdUnregisterFd(ki, fd, FALSE);
|
||||
ioctl(fd, KDSKBMODE, LinuxKbdTrans);
|
||||
|
|
@ -753,7 +753,7 @@ LinuxKeyboardLeds (KdKeyboardInfo *ki, int leds)
|
|||
if (!ki)
|
||||
return;
|
||||
|
||||
ioctl ((int)ki->driverPrivate, KDSETLED, leds & 7);
|
||||
ioctl ((int)(intptr_t)ki->driverPrivate, KDSETLED, leds & 7);
|
||||
}
|
||||
|
||||
KdKeyboardDriver LinuxKeyboardDriver = {
|
||||
|
|
|
|||
|
|
@ -152,7 +152,7 @@ MsEnable (KdPointerInfo *pi)
|
|||
}
|
||||
if (KdRegisterFd (port, MsRead, pi))
|
||||
return TRUE;
|
||||
pi->driverPrivate = (void *)port;
|
||||
pi->driverPrivate = (void *)(intptr_t)port;
|
||||
|
||||
return Success;
|
||||
|
||||
|
|
@ -164,7 +164,7 @@ MsEnable (KdPointerInfo *pi)
|
|||
static void
|
||||
MsDisable (KdPointerInfo *pi)
|
||||
{
|
||||
KdUnregisterFd (pi, (int)pi->driverPrivate, TRUE);
|
||||
KdUnregisterFd (pi, (int)(intptr_t)pi->driverPrivate, TRUE);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
|
|
@ -159,7 +159,7 @@ Ps2Enable (KdPointerInfo *pi)
|
|||
return BadAlloc;
|
||||
}
|
||||
|
||||
pi->driverPrivate = (void *)fd;
|
||||
pi->driverPrivate = (void *)(intptr_t)fd;
|
||||
|
||||
return Success;
|
||||
}
|
||||
|
|
@ -168,7 +168,7 @@ Ps2Enable (KdPointerInfo *pi)
|
|||
static void
|
||||
Ps2Disable (KdPointerInfo *pi)
|
||||
{
|
||||
KdUnregisterFd (pi, (int)pi->driverPrivate, TRUE);
|
||||
KdUnregisterFd (pi, (int)(intptr_t)pi->driverPrivate, TRUE);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue