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
diff --git a/common/rfb/CMsgReader.cxx b/common/rfb/CMsgReader.cxx
index a78a1a0..e3b73bf 100644
--- a/common/rfb/CMsgReader.cxx
+++ b/common/rfb/CMsgReader.cxx
@@ -28,14 +28,14 @@
: imageBufIdealSize(0), handler(handler_), is(is_),
imageBuf(0), imageBufSize(0)
{
- for (unsigned int i = 0; i <= encodingMax; i++) {
+ for (int i = 0; i <= encodingMax; i++) {
decoders[i] = 0;
}
}
CMsgReader::~CMsgReader()
{
- for (unsigned int i = 0; i <= encodingMax; i++) {
+ for (int i = 0; i <= encodingMax; i++) {
delete decoders[i];
}
delete [] imageBuf;
@@ -82,7 +82,7 @@
handler->framebufferUpdateEnd();
}
-void CMsgReader::readRect(const Rect& r, unsigned int encoding)
+void CMsgReader::readRect(const Rect& r, int encoding)
{
if ((r.br.x > handler->cp.width) || (r.br.y > handler->cp.height)) {
fprintf(stderr, "Rect too big: %dx%d at %d,%d exceeds %dx%d\n",