From 314774c3cb34c3b1d74be3a8487e3628dbb31d4f Mon Sep 17 00:00:00 2001
From: Robert Sesek <rsesek@bluestatic.org>
Date: Sat, 26 Feb 2011 14:17:36 -0500
Subject: [PATCH] Fix some signedness errors

---
 Source/NetworkConnection.h        | 6 +++---
 Source/NetworkConnection.mm       | 4 ++--
 Source/NetworkConnectionPrivate.h | 4 ++--
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/Source/NetworkConnection.h b/Source/NetworkConnection.h
index 94f8740..99301e1 100644
--- a/Source/NetworkConnection.h
+++ b/Source/NetworkConnection.h
@@ -57,13 +57,13 @@ class NetworkCallbackController;
 
   // An ever-increasing integer that gives each transaction a unique ID for the
   // debugging engine.
-  NSUInteger transactionID;
+  NSInteger transactionID;
   
   // The most recently received transaction ID.
-  NSUInteger lastReadTransaction_;
+  NSInteger lastReadTransaction_;
   
   // The last transactionID written to the stream.
-  NSUInteger lastWrittenTransaction_;
+  NSInteger lastWrittenTransaction_;
   
   // To prevent blocked writing, we enqueue all writes and then wait for the
   // write stream to tell us it's ready. We store the pending commands in this
diff --git a/Source/NetworkConnection.mm b/Source/NetworkConnection.mm
index db462b2..893d43a 100644
--- a/Source/NetworkConnection.mm
+++ b/Source/NetworkConnection.mm
@@ -309,7 +309,7 @@ void PerformQuitSignal(void* info)
   {
     // Find the NULL separator, or the end of the string.
     NSUInteger partLength = 0;
-    for (NSUInteger i = bufferOffset; i < bytesRead && charBuffer[i] != '\0'; ++i, ++partLength) ;
+    for (CFIndex i = bufferOffset; i < bytesRead && charBuffer[i] != '\0'; ++i, ++partLength) ;
     
     // If there is not a current packet, set some state.
     if (!self.currentPacket)
@@ -483,7 +483,7 @@ void PerformQuitSignal(void* info)
         NSLog(@"write error");
       }
       // Incomplete write.
-      else if (bytesWritten < strlen(string))
+      else if (bytesWritten < static_cast<CFIndex>(strlen(string)))
       {
         // Adjust the buffer and wait for another chance to write.
         stringLength -= bytesWritten;
diff --git a/Source/NetworkConnectionPrivate.h b/Source/NetworkConnectionPrivate.h
index 3b8f7f4..0cffb27 100644
--- a/Source/NetworkConnectionPrivate.h
+++ b/Source/NetworkConnectionPrivate.h
@@ -21,10 +21,10 @@
 @interface NetworkConnection ()
 
 @property (assign) CFReadStreamRef readStream;
-@property NSUInteger lastReadTransaction;
+@property NSInteger lastReadTransaction;
 @property (retain) NSMutableString* currentPacket;
 @property (assign) CFWriteStreamRef writeStream;
-@property NSUInteger lastWrittenTransaction;
+@property NSInteger lastWrittenTransaction;
 @property (retain) NSMutableArray* queuedWrites;
 
 - (void)runNetworkThread;
-- 
2.43.5