Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1261)

Unified Diff: webrtc/examples/objc/AppRTCMobile/third_party/SocketRocket/SRWebSocket.m

Issue 2704383004: Remove some warning suppressions from SocketRocket. (Closed)
Patch Set: Remove some warning suppressions from SocketRocket Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/examples/BUILD.gn ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/examples/objc/AppRTCMobile/third_party/SocketRocket/SRWebSocket.m
diff --git a/webrtc/examples/objc/AppRTCMobile/third_party/SocketRocket/SRWebSocket.m b/webrtc/examples/objc/AppRTCMobile/third_party/SocketRocket/SRWebSocket.m
index b4868a7898400a582c673afad688c2502da6a21c..b9148cd384f07332305b330171e34269945f8f79 100644
--- a/webrtc/examples/objc/AppRTCMobile/third_party/SocketRocket/SRWebSocket.m
+++ b/webrtc/examples/objc/AppRTCMobile/third_party/SocketRocket/SRWebSocket.m
@@ -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
« no previous file with comments | « webrtc/examples/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698