Fix some signedness errors
authorRobert Sesek <rsesek@bluestatic.org>
Sat, 26 Feb 2011 19:17:36 +0000 (14:17 -0500)
committerRobert Sesek <rsesek@bluestatic.org>
Sat, 26 Feb 2011 19:17:36 +0000 (14:17 -0500)
Source/NetworkConnection.h
Source/NetworkConnection.mm
Source/NetworkConnectionPrivate.h

index 94f8740ca4ef7a8a3844b24663272dc8b209b546..99301e18abd4cb7cbb2f0ca6e69a00110dd5a991 100644 (file)
@@ -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
index db462b2969e7e4c4a5ccf9132a32a235c40be74d..893d43ad0aa42f03cc776a7098872b1a2bc138a0 100644 (file)
@@ -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;
index 3b8f7f462da72b499512e6fc669eb712cc4c1235..0cffb27ffd8be321c31b063c853f6925cbe8d428 100644 (file)
 @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;