Fix bad signed/unsigned comparisons
Either by casting, or switching to a more appropriate type
for the variable.
diff --git a/common/rfb/EncodeManager.cxx b/common/rfb/EncodeManager.cxx
index e632387..4e133d3 100644
--- a/common/rfb/EncodeManager.cxx
+++ b/common/rfb/EncodeManager.cxx
@@ -152,7 +152,7 @@
void EncodeManager::logStats()
{
- int i, j;
+ size_t i, j;
unsigned rects;
unsigned long long pixels, bytes, equivalent;
@@ -603,7 +603,7 @@
Encoder *encoder;
struct RectInfo info;
- int divisor, maxColours;
+ unsigned int divisor, maxColours;
bool useRLE;
EncoderType type;
diff --git a/common/rfb/TightEncoder.cxx b/common/rfb/TightEncoder.cxx
index ec19c2e..fe2470b 100644
--- a/common/rfb/TightEncoder.cxx
+++ b/common/rfb/TightEncoder.cxx
@@ -201,7 +201,7 @@
}
while (count) {
- int iter_count;
+ unsigned int iter_count;
iter_count = sizeof(rgb)/3;
if (iter_count > count)
diff --git a/common/rfb/VNCServerST.cxx b/common/rfb/VNCServerST.cxx
index 51cb86c..199524e 100644
--- a/common/rfb/VNCServerST.cxx
+++ b/common/rfb/VNCServerST.cxx
@@ -544,7 +544,7 @@
if (!deferPending)
return true;
- if (msSince(&deferStart) >= deferUpdateTime)
+ if (msSince(&deferStart) >= (unsigned)deferUpdateTime)
return true;
return false;