Remove some warning suppressions from SocketRocket.

These warnings started appearing on a clang update. This CL patches the
vendored library and removes the supression. We assert on the return as
we're not equipped to deal with failures there anyway.

BUG=webrtc:6396
NOTRY=true

Review-Url: https://codereview.webrtc.org/2704383004
Cr-Commit-Position: refs/heads/master@{#16820}
This commit is contained in:
kthelgason
2017-02-24 01:30:00 -08:00
committed by Commit bot
parent b5388d7748
commit 49990e88fb
2 changed files with 3 additions and 8 deletions

View File

@ -393,16 +393,11 @@ if (is_ios || (is_mac && target_cpu != "x86")) {
"-Wno-deprecated-declarations",
"-Wno-nonnull",
"-Wno-semicolon-before-method-body",
"-Wno-unused-variable",
]
cflags_objc = [
# Enabled for cflags_objc in build/config/compiler/BUILD.gn.
"-Wno-objc-missing-property-synthesis",
# Hide the warning for SecRandomCopyBytes(), until we update to upstream.
# https://bugs.chromium.org/p/webrtc/issues/detail?id=6396
"-Wno-unused-result",
]
}

View File

@ -504,7 +504,7 @@ static __strong NSData *CRLFCRLF;
CFHTTPMessageSetHeaderFieldValue(request, CFSTR("Host"), (__bridge CFStringRef)(_url.port ? [NSString stringWithFormat:@"%@:%@", _url.host, _url.port] : _url.host));
NSMutableData *keyBytes = [[NSMutableData alloc] initWithLength:16];
SecRandomCopyBytes(kSecRandomDefault, keyBytes.length, keyBytes.mutableBytes);
assert(!SecRandomCopyBytes(kSecRandomDefault, keyBytes.length, keyBytes.mutableBytes));
if ([keyBytes respondsToSelector:@selector(base64EncodedStringWithOptions:)]) {
_secKey = [keyBytes base64EncodedStringWithOptions:0];
@ -528,7 +528,7 @@ static __strong NSData *CRLFCRLF;
[_urlRequest.allHTTPHeaderFields enumerateKeysAndObjectsUsingBlock:^(id key, id obj, BOOL *stop) {
CFHTTPMessageSetHeaderFieldValue(request, (__bridge CFStringRef)key, (__bridge CFStringRef)obj);
}];
NSData *message = CFBridgingRelease(CFHTTPMessageCopySerializedMessage(request));
CFRelease(request);
@ -1361,7 +1361,7 @@ static const size_t SRFrameHeaderOverhead = 32;
}
} else {
uint8_t *mask_key = frame_buffer + frame_buffer_size;
SecRandomCopyBytes(kSecRandomDefault, sizeof(uint32_t), (uint8_t *)mask_key);
assert(!SecRandomCopyBytes(kSecRandomDefault, sizeof(uint32_t), (uint8_t *)mask_key));
frame_buffer_size += sizeof(uint32_t);
// TODO: could probably optimize this with SIMD