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/SMsgReader.cxx b/common/rfb/SMsgReader.cxx
index 447e0a4..49d8dcf 100644
--- a/common/rfb/SMsgReader.cxx
+++ b/common/rfb/SMsgReader.cxx
@@ -51,7 +51,7 @@
{
is->skip(1);
int nEncodings = is->readU16();
- rdr::U32Array encodings(nEncodings);
+ rdr::S32Array encodings(nEncodings);
for (int i = 0; i < nEncodings; i++)
encodings.buf[i] = is->readU32();
handler->setEncodings(nEncodings, encodings.buf);