[Bugfix] Fix various compilation warnings.


git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4224 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/unix/xserver/hw/vnc/Input.cc b/unix/xserver/hw/vnc/Input.cc
index e23f3d3..c0e28bc 100644
--- a/unix/xserver/hw/vnc/Input.cc
+++ b/unix/xserver/hw/vnc/Input.cc
@@ -325,9 +325,8 @@
 
 	void press()
 	{
-		int state, index, maxKeysPerMod, keycode;
+		int state, maxKeysPerMod, keycode;
 #if XORG >= 17
-		int ret;
 		KeyCode *modmap = NULL;
 
 		state = XkbStateFieldFromRec(&dev->u.master->key->xkbInfo->state);
@@ -360,7 +359,6 @@
 		int state, maxKeysPerMod;
 		KeyClassPtr keyc;
 #if XORG >= 17
-		int ret;
 		KeyCode *modmap = NULL;
 
 		keyc = dev->u.master->key;
@@ -511,7 +509,9 @@
 
 void InputDevice::keyEvent(rdr::U32 keysym, bool down)
 {
+#if XORG < 17
 	DeviceIntPtr master;
+#endif
 	KeyClassPtr keyc;
 	KeySymsPtr keymap = NULL;
 	KeySym *map = NULL;
@@ -795,6 +795,7 @@
 	return 0;
 }
 
+#if XORG < 17
 /* Fairly standard US PC Keyboard */
 
 #define MIN_KEY 8
@@ -962,6 +963,7 @@
 
 	return TRUE;
 }
+#endif
 
 static void keyboardBell(int percent, DeviceIntPtr device, pointer ctrl,
 			 int class_)
@@ -972,8 +974,10 @@
 
 static int keyboardProc(DeviceIntPtr pDevice, int onoff)
 {
+#if XORG < 17
 	KeySymsRec keySyms;
 	CARD8 modMap[MAP_LENGTH];
+#endif
 	DevicePtr pDev = (DevicePtr)pDevice;
 
 	switch (onoff) {
diff --git a/unix/xserver/hw/vnc/xvnc.cc b/unix/xserver/hw/vnc/xvnc.cc
index cc15d79..56912f9 100644
--- a/unix/xserver/hw/vnc/xvnc.cc
+++ b/unix/xserver/hw/vnc/xvnc.cc
@@ -166,7 +166,6 @@
 static Bool Render = TRUE;
 
 static bool displaySpecified = false;
-static bool wellKnownSocketsCreated = false;
 static char displayNumStr[16];
 
 char *listenaddr = NULL;
@@ -838,7 +837,6 @@
 
 static Bool vncRandRGetInfo (ScreenPtr pScreen, Rotation *rotations)
 {
-  vfbScreenInfoPtr pvfb = &vfbScreens[pScreen->myNum];
   Bool ret, gotCurrent = FALSE;
   int i;