[PATCH] Kill compilation warnings.

Marcin Baczyński marbacz at gmail.com
Thu Oct 22 11:15:09 PDT 2009


Kill compilation warnings.

Signed-off-by: Marcin Baczyński <marbacz at gmail.com>
---
 hw/xfree86/common/xf86Xinput.c |   12 +++++++++---
 hw/xfree86/common/xf86cmap.c   |    2 ++
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c
index fd07c2a..6887f55 100644
--- a/hw/xfree86/common/xf86Xinput.c
+++ b/hw/xfree86/common/xf86Xinput.c
@@ -726,12 +726,15 @@ xf86PostMotionEventP(DeviceIntPtr device,
                     int                        *valuators)
 {
     int i = 0, nevents = 0;
-    int dx = 0, dy = 0;
     Bool drag = xf86SendDragEvents(device);
     DeviceEvent *event;
-    int index;
     int flags = 0;

+#if XFreeXDGA
+    int index;
+    int dx = 0, dy = 0;
+#endif
+
     XI_VERIFY_VALUATORS(num_valuators);

     if (is_absolute)
@@ -856,9 +859,12 @@ xf86PostButtonEventP(DeviceIntPtr  device,
                      int               *valuators)
 {
     int i = 0, nevents = 0;
-    int index;
     int flags = 0;

+#if XFreeXDGA
+    int index;
+#endif
+
     XI_VERIFY_VALUATORS(num_valuators);

     if (is_absolute)
diff --git a/hw/xfree86/common/xf86cmap.c b/hw/xfree86/common/xf86cmap.c
index 36e6f96..08f557c 100644
--- a/hw/xfree86/common/xf86cmap.c
+++ b/hw/xfree86/common/xf86cmap.c
@@ -115,7 +115,9 @@ static void CMapDestroyColormap (ColormapPtr);

 static Bool CMapEnterVT(int, int);
 static Bool CMapSwitchMode(int, DisplayModePtr, int);
+#ifdef XFreeXDGA
 static int  CMapSetDGAMode(int, int, DGADevicePtr);
+#endif
 static int  CMapChangeGamma(int, Gamma);

 static void ComputeGamma(CMapScreenPtr);
--
1.6.5.1
-------------- next part --------------
From edc6f613d625ea074e1112f047a0fe6fc11eed7c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marcin=20Baczy=C5=84ski?= <marbacz at gmail.com>
Date: Thu, 22 Oct 2009 14:43:25 +0200
Subject: [PATCH] Kill compilation warnings.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Marcin Baczyński <marbacz at gmail.com>
---
 hw/xfree86/common/xf86Xinput.c |   12 +++++++++---
 hw/xfree86/common/xf86cmap.c   |    2 ++
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c
index fd07c2a..6887f55 100644
--- a/hw/xfree86/common/xf86Xinput.c
+++ b/hw/xfree86/common/xf86Xinput.c
@@ -726,12 +726,15 @@ xf86PostMotionEventP(DeviceIntPtr	device,
                     int			*valuators)
 {
     int i = 0, nevents = 0;
-    int dx = 0, dy = 0;
     Bool drag = xf86SendDragEvents(device);
     DeviceEvent *event;
-    int index;
     int flags = 0;
 
+#if XFreeXDGA
+    int index;
+    int dx = 0, dy = 0;
+#endif
+
     XI_VERIFY_VALUATORS(num_valuators);
 
     if (is_absolute)
@@ -856,9 +859,12 @@ xf86PostButtonEventP(DeviceIntPtr	device,
                      int		*valuators)
 {
     int i = 0, nevents = 0;
-    int index;
     int flags = 0;
 
+#if XFreeXDGA
+    int index;
+#endif
+
     XI_VERIFY_VALUATORS(num_valuators);
 
     if (is_absolute)
diff --git a/hw/xfree86/common/xf86cmap.c b/hw/xfree86/common/xf86cmap.c
index 36e6f96..08f557c 100644
--- a/hw/xfree86/common/xf86cmap.c
+++ b/hw/xfree86/common/xf86cmap.c
@@ -115,7 +115,9 @@ static void CMapDestroyColormap (ColormapPtr);
 
 static Bool CMapEnterVT(int, int);
 static Bool CMapSwitchMode(int, DisplayModePtr, int);
+#ifdef XFreeXDGA
 static int  CMapSetDGAMode(int, int, DGADevicePtr);
+#endif
 static int  CMapChangeGamma(int, Gamma);
 
 static void ComputeGamma(CMapScreenPtr);
-- 
1.6.5.1


More information about the xorg-devel mailing list