/[gentoo-x86]/x11-base/xorg-server/files/xorg-server-1.11-pointer-to-int-cast.patch
Gentoo

Contents of /x11-base/xorg-server/files/xorg-server-1.11-pointer-to-int-cast.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Sat Jun 9 19:49:30 2012 UTC (2 years, 2 months ago) by chithanh
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +0 -0 lines
FILE REMOVED
Drop vulnerable versions.

(Portage version: 2.2.0_alpha109/cvs/Linux x86_64)

1 From b2a4c09507b267495ea5e4c2e05373b323c80edf Mon Sep 17 00:00:00 2001
2 From: Jeremy Huddleston <jeremyhu@apple.com>
3 Date: Sat, 17 Dec 2011 20:56:59 +0000
4 Subject: kdrive/linux: Fix compilation with -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast
5
6 Reported-by: Arkadiusz Miƛkiewicz <arekm@maven.pl>
7 Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
8 Reviewed-by: Jamey Sharp <jamey@minilop.net>
9 (cherry picked from commit 1deede3c48d5ac91f50774c79f02afc6e036614e)
10 ---
11 diff --git a/hw/kdrive/linux/keyboard.c b/hw/kdrive/linux/keyboard.c
12 index f5f9d9b..ba2637b 100644
13 --- a/hw/kdrive/linux/keyboard.c
14 +++ b/hw/kdrive/linux/keyboard.c
15 @@ -692,7 +692,7 @@ LinuxKeyboardEnable (KdKeyboardInfo *ki)
16 return !Success;
17
18 fd = LinuxConsoleFd;
19 - ki->driverPrivate = (void *) fd;
20 + ki->driverPrivate = (void *) (intptr_t) fd;
21
22 ioctl (fd, KDGKBMODE, &LinuxKbdTrans);
23 tcgetattr (fd, &LinuxTermios);
24 @@ -724,7 +724,7 @@ LinuxKeyboardDisable (KdKeyboardInfo *ki)
25 if (!ki)
26 return;
27
28 - fd = (int) ki->driverPrivate;
29 + fd = (int) (intptr_t) ki->driverPrivate;
30
31 KdUnregisterFd(ki, fd, FALSE);
32 ioctl(fd, KDSKBMODE, LinuxKbdTrans);
33 @@ -753,7 +753,7 @@ LinuxKeyboardLeds (KdKeyboardInfo *ki, int leds)
34 if (!ki)
35 return;
36
37 - ioctl ((int)ki->driverPrivate, KDSETLED, leds & 7);
38 + ioctl ((int)(intptr_t)ki->driverPrivate, KDSETLED, leds & 7);
39 }
40
41 KdKeyboardDriver LinuxKeyboardDriver = {
42 diff --git a/hw/kdrive/linux/ms.c b/hw/kdrive/linux/ms.c
43 index b6151cd..176e125 100644
44 --- a/hw/kdrive/linux/ms.c
45 +++ b/hw/kdrive/linux/ms.c
46 @@ -152,7 +152,7 @@ MsEnable (KdPointerInfo *pi)
47 }
48 if (KdRegisterFd (port, MsRead, pi))
49 return TRUE;
50 - pi->driverPrivate = (void *)port;
51 + pi->driverPrivate = (void *)(intptr_t)port;
52
53 return Success;
54
55 @@ -164,7 +164,7 @@ MsEnable (KdPointerInfo *pi)
56 static void
57 MsDisable (KdPointerInfo *pi)
58 {
59 - KdUnregisterFd (pi, (int)pi->driverPrivate, TRUE);
60 + KdUnregisterFd (pi, (int)(intptr_t)pi->driverPrivate, TRUE);
61 }
62
63 static void
64 diff --git a/hw/kdrive/linux/ps2.c b/hw/kdrive/linux/ps2.c
65 index 465b963..b62d769 100644
66 --- a/hw/kdrive/linux/ps2.c
67 +++ b/hw/kdrive/linux/ps2.c
68 @@ -159,7 +159,7 @@ Ps2Enable (KdPointerInfo *pi)
69 return BadAlloc;
70 }
71
72 - pi->driverPrivate = (void *)fd;
73 + pi->driverPrivate = (void *)(intptr_t)fd;
74
75 return Success;
76 }
77 @@ -168,7 +168,7 @@ Ps2Enable (KdPointerInfo *pi)
78 static void
79 Ps2Disable (KdPointerInfo *pi)
80 {
81 - KdUnregisterFd (pi, (int)pi->driverPrivate, TRUE);
82 + KdUnregisterFd (pi, (int)(intptr_t)pi->driverPrivate, TRUE);
83 }
84
85 static void
86 --
87 cgit v0.9.0.2-2-gbebe

  ViewVC Help
Powered by ViewVC 1.1.20