Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fix uninitialized-variable error with Xcode 4.6+ #57

Merged
merged 1 commit into from

2 participants

@snej

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.

@snej snej 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.
5f8386d
@vronin vronin merged commit f1cebb1 into robbiehanson:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 5, 2013
  1. @snej

    Fix uninitialized-variable error

    snej authored
    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.
This page is out of date. Refresh to see the latest.
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
Something went wrong with that request. Please try again.