summaryrefslogtreecommitdiffstats
path: root/unix/xserver
diff options
context:
space:
mode:
authorPeter Åstrand <astrand@cendio.se>2009-01-26 09:10:57 +0000
committerPeter Åstrand <astrand@cendio.se>2009-01-26 09:10:57 +0000
commit15c5a7d913d64718ad85cdb78327134a5ae51c86 (patch)
tree39130b2bff9f3e8d2af058c4ea4f2facc3f7e9e8 /unix/xserver
parentc6a2065ba42aedd817d2d6ae778abec7a9bd9f23 (diff)
downloadtigervnc-15c5a7d913d64718ad85cdb78327134a5ae51c86.tar.gz
tigervnc-15c5a7d913d64718ad85cdb78327134a5ae51c86.zip
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
Diffstat (limited to 'unix/xserver')
-rw-r--r--unix/xserver/hw/vnc/XserverDesktop.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/unix/xserver/hw/vnc/XserverDesktop.cc b/unix/xserver/hw/vnc/XserverDesktop.cc
index 203ad5ad..da4935ac 100644
--- a/unix/xserver/hw/vnc/XserverDesktop.cc
+++ b/unix/xserver/hw/vnc/XserverDesktop.cc
@@ -180,7 +180,7 @@ XserverDesktop::XserverDesktop(ScreenPtr pScreen_,
}
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 @@ void XserverDesktop::serverReset(ScreenPtr pScreen_)
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 @@ void XserverDesktop::setColourMapEntries(ColormapPtr pColormap, int ndef,
{
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 @@ void XserverDesktop::keyEvent(rdr::U32 keysym, bool down)
{
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");