diff options
author | Peter Åstrand <astrand@cendio.se> | 2010-02-10 07:43:02 +0000 |
---|---|---|
committer | Peter Åstrand <astrand@cendio.se> | 2010-02-10 07:43:02 +0000 |
commit | 98fe98c68939fee9bdf492e813a50f239674b733 (patch) | |
tree | 99935d1420b497c483a98ca193759b7d31fdeffd /unix | |
parent | 618c1707a4d29e1d6efda633fadaaf81d1f80062 (diff) | |
download | tigervnc-98fe98c68939fee9bdf492e813a50f239674b733.tar.gz tigervnc-98fe98c68939fee9bdf492e813a50f239674b733.zip |
Eliminate GCC signed/unsigned warnings related to encodings: The
encoding in the RFB protocol has always been signed, and signed values
are also used in the specification (ie DesktopName = -307 etc). In the
code, however, unsigned types were used in a number of places, but not
all, which causes warnings. This patch fixes the problem by switching
to signed values everywhere.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@3968 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'unix')
-rw-r--r-- | unix/vncviewer/CConn.cxx | 6 | ||||
-rw-r--r-- | unix/vncviewer/CConn.h | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/unix/vncviewer/CConn.cxx b/unix/vncviewer/CConn.cxx index aa21daaa..5fc809f5 100644 --- a/unix/vncviewer/CConn.cxx +++ b/unix/vncviewer/CConn.cxx @@ -396,7 +396,7 @@ void CConn::serverCutText(const char* str, rdr::U32 len) { // We start timing on beginRect and stop timing on endRect, to // avoid skewing the bandwidth estimation as a result of the server // being slow or the network having high latency -void CConn::beginRect(const Rect& r, unsigned int encoding) +void CConn::beginRect(const Rect& r, int encoding) { sock->inStream().startTiming(); if (encoding != encodingCopyRect) { @@ -404,7 +404,7 @@ void CConn::beginRect(const Rect& r, unsigned int encoding) } } -void CConn::endRect(const Rect& r, unsigned int encoding) +void CConn::endRect(const Rect& r, int encoding) { sock->inStream().stopTiming(); if (debugDelay != 0) { @@ -636,7 +636,7 @@ void CConn::getOptions() { formatChange = true; } } - unsigned int newEncoding = (options.tight.checked() ? encodingTight : + int newEncoding = (options.tight.checked() ? encodingTight : options.zrle.checked() ? encodingZRLE : options.hextile.checked() ? encodingHextile : encodingRaw); diff --git a/unix/vncviewer/CConn.h b/unix/vncviewer/CConn.h index e3f17c3c..294b9b12 100644 --- a/unix/vncviewer/CConn.h +++ b/unix/vncviewer/CConn.h @@ -83,8 +83,8 @@ public: void serverCutText(const char* str, rdr::U32 len); void framebufferUpdateStart(); void framebufferUpdateEnd(); - void beginRect(const rfb::Rect& r, unsigned int encoding); - void endRect(const rfb::Rect& r, unsigned int encoding); + void beginRect(const rfb::Rect& r, int encoding); + void endRect(const rfb::Rect& r, int encoding); void fillRect(const rfb::Rect& r, rfb::Pixel p); void imageRect(const rfb::Rect& r, void* p); void copyRect(const rfb::Rect& r, int sx, int sy); @@ -114,7 +114,7 @@ private: TXEventHandler* desktopEventHandler; rfb::PixelFormat fullColourPF; std::list<rfb::Rect> debugRects; - unsigned int currentEncoding, lastServerEncoding; + int currentEncoding, lastServerEncoding; bool fullColour; bool autoSelect; bool shared; |