Eliminated several GCC warnings:

* Initializing "vis" variable. 

* Using dixLookupResourceByType instead of deprecated
dixLookupResource.

* Using unsigned integers when dealing with unsigned numbers. 



git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@3573 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/unix/xserver/hw/vnc/XserverDesktop.cc b/unix/xserver/hw/vnc/XserverDesktop.cc
index 203ad5a..da4935a 100644
--- a/unix/xserver/hw/vnc/XserverDesktop.cc
+++ b/unix/xserver/hw/vnc/XserverDesktop.cc
@@ -180,7 +180,7 @@
   }
   format.bigEndian = (screenInfo.imageByteOrder == MSBFirst);
 
-  VisualPtr vis;
+  VisualPtr vis = NULL;
   for (i = 0; i < pScreen->numVisuals; i++) {
     if (pScreen->visuals[i].vid == pScreen->rootVisual) {
       vis = &pScreen->visuals[i];
@@ -263,7 +263,7 @@
   int i;
   pointer retval;
 
-  i = dixLookupResource(&retval, pScreen->defColormap, RT_COLORMAP, NullClient,
+  i = dixLookupResourceByType(&retval, pScreen->defColormap, RT_COLORMAP, NullClient,
 			DixReadAccess);
 
   /* Handle suspicious conditions */
@@ -352,8 +352,8 @@
 {
   if (cmap != pColormap || ndef <= 0) return;
 
-  int first = pdef[0].pixel;
-  int n = 1;
+  unsigned int first = pdef[0].pixel;
+  unsigned int n = 1;
 
   for (int i = 1; i < ndef; i++) {
     if (first + n == pdef[i].pixel) {
@@ -984,7 +984,8 @@
 {
   KeyClassPtr keyc = vncKeyboardDevice->key;
   KeySymsPtr keymap = &keyc->curKeySyms;
-  int i, j, k, n;
+  unsigned int i, n;
+  int j, k;
 
   if (keysym == XK_Caps_Lock) {
     vlog.debug("Ignoring caps lock");