summaryrefslogtreecommitdiffstats
path: root/common/rfb/encodings.h
diff options
context:
space:
mode:
authorPeter Åstrand <astrand@cendio.se>2010-02-10 07:43:02 +0000
committerPeter Åstrand <astrand@cendio.se>2010-02-10 07:43:02 +0000
commit98fe98c68939fee9bdf492e813a50f239674b733 (patch)
tree99935d1420b497c483a98ca193759b7d31fdeffd /common/rfb/encodings.h
parent618c1707a4d29e1d6efda633fadaaf81d1f80062 (diff)
downloadtigervnc-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 'common/rfb/encodings.h')
-rw-r--r--common/rfb/encodings.h38
1 files changed, 19 insertions, 19 deletions
diff --git a/common/rfb/encodings.h b/common/rfb/encodings.h
index 17c7f29f..16cd73a4 100644
--- a/common/rfb/encodings.h
+++ b/common/rfb/encodings.h
@@ -20,30 +20,30 @@
namespace rfb {
- const unsigned int encodingRaw = 0;
- const unsigned int encodingCopyRect = 1;
- const unsigned int encodingRRE = 2;
- const unsigned int encodingCoRRE = 4;
- const unsigned int encodingHextile = 5;
- const unsigned int encodingTight = 7;
- const unsigned int encodingZRLE = 16;
+ const int encodingRaw = 0;
+ const int encodingCopyRect = 1;
+ const int encodingRRE = 2;
+ const int encodingCoRRE = 4;
+ const int encodingHextile = 5;
+ const int encodingTight = 7;
+ const int encodingZRLE = 16;
- const unsigned int encodingMax = 255;
+ const int encodingMax = 255;
- const unsigned int pseudoEncodingXCursor = 0xffffff10;
- const unsigned int pseudoEncodingCursor = 0xffffff11;
- const unsigned int pseudoEncodingDesktopSize = 0xffffff21;
- const unsigned int pseudoEncodingExtendedDesktopSize = 0xfffffecc;
- const unsigned int pseudoEncodingDesktopName = 0xfffffecdl;
+ const int pseudoEncodingXCursor = -240;
+ const int pseudoEncodingCursor = -239;
+ const int pseudoEncodingDesktopSize = -223;
+ const int pseudoEncodingExtendedDesktopSize = -308;
+ const int pseudoEncodingDesktopName = -307;
// TightVNC-specific
- const unsigned int pseudoEncodingLastRect = 0xFFFFFF20;
- const unsigned int pseudoEncodingQualityLevel0 = 0xFFFFFFE0;
- const unsigned int pseudoEncodingQualityLevel9 = 0xFFFFFFE9;
- const unsigned int pseudoEncodingCompressLevel0 = 0xFFFFFF00;
- const unsigned int pseudoEncodingCompressLevel9 = 0xFFFFFF09;
+ const int pseudoEncodingLastRect = -224;
+ const int pseudoEncodingQualityLevel0 = -32;
+ const int pseudoEncodingQualityLevel9 = -23;
+ const int pseudoEncodingCompressLevel0 = -256;
+ const int pseudoEncodingCompressLevel9 = -247;
int encodingNum(const char* name);
- const char* encodingName(unsigned int num);
+ const char* encodingName(int num);
}
#endif