Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix uninitialized-variable error

The version of Clang in Xcode 4.6 now complains about usage of an
uninitialized variable 'hasBytesAvailable' in -[GCDAsyncSocket doReadData].
This breaks compilation. I've added a few lines to initialize the variable.
  • Loading branch information...
commit 5f8386d0677049bd1198ad9f4c1c5966d809d22a 1 parent 6625620
@snej snej authored
Showing with 3 additions and 6 deletions.
  1. +3 −6 Vendor/CocoaAsyncSocket/GCDAsyncSocket.m
View
9 Vendor/CocoaAsyncSocket/GCDAsyncSocket.m
@@ -4213,16 +4213,13 @@ - (void)doReadData
if ([self usingCFStreamForTLS])
{
+ hasBytesAvailable = NO;
+ estimatedBytesAvailable = 0;
#if TARGET_OS_IPHONE
-
// Relegated to using CFStream... :( Boo! Give us a full SecureTransport stack Apple!
-
- estimatedBytesAvailable = 0;
+
if ((flags & kSecureSocketHasBytesAvailable) && CFReadStreamHasBytesAvailable(readStream))
hasBytesAvailable = YES;
- else
- hasBytesAvailable = NO;
-
#endif
}
else
Please sign in to comment.
Something went wrong with that request. Please try again.