@@ -543,7 +543,8 @@ - (void)didConnect
543
543
_url.host, _url.port] : _url.host ));
544
544
545
545
NSMutableData *keyBytes = [[NSMutableData alloc ] initWithLength: 16 ];
546
- int result = SecRandomCopyBytes (kSecRandomDefault , keyBytes.length , keyBytes.mutableBytes );
546
+ int __unused result =
547
+ SecRandomCopyBytes (kSecRandomDefault , keyBytes.length , keyBytes.mutableBytes );
547
548
assert (result == 0 );
548
549
_secKey = [FSRUtilities base64EncodedStringFromData: keyBytes];
549
550
assert ([_secKey length ] == 24 );
@@ -688,7 +689,14 @@ - (void)closeWithCode:(NSInteger)code reason:(NSString *)reason;
688
689
689
690
NSUInteger usedLength = 0 ;
690
691
691
- BOOL success = [reason getBytes: (char *)mutablePayload.mutableBytes + sizeof (uint16_t ) maxLength: payload.length - sizeof (uint16_t ) usedLength: &usedLength encoding: NSUTF8StringEncoding options: NSStringEncodingConversionExternalRepresentation range: NSMakeRange (0 , reason.length) remainingRange: &remainingRange];
692
+ BOOL __unused success =
693
+ [reason getBytes: (char *)mutablePayload.mutableBytes + sizeof (uint16_t )
694
+ maxLength: payload.length - sizeof (uint16_t )
695
+ usedLength: &usedLength
696
+ encoding: NSUTF8StringEncoding
697
+ options: NSStringEncodingConversionExternalRepresentation
698
+ range: NSMakeRange (0 , reason.length)
699
+ remainingRange: &remainingRange];
692
700
693
701
assert (success);
694
702
assert (remainingRange.length == 0 );
@@ -1055,7 +1063,7 @@ - (void)_readFrameContinue;
1055
1063
[self _handleFrameHeader: header curData: self ->_currentFrameData];
1056
1064
} else {
1057
1065
[self _addConsumerWithDataLength: extra_bytes_needed callback: ^(FSRWebSocket *self , NSData *data) {
1058
- size_t mapped_size = data.length ;
1066
+ size_t __unused mapped_size = data.length ;
1059
1067
const void *mapped_buffer = data.bytes ;
1060
1068
size_t offset = 0 ;
1061
1069
@@ -1425,7 +1433,8 @@ - (void)_sendFrameWithOpcode:(FSROpCode)opcode data:(id)data;
1425
1433
}
1426
1434
} else {
1427
1435
uint8_t *mask_key = frame_buffer + frame_buffer_size;
1428
- int result = SecRandomCopyBytes (kSecRandomDefault , sizeof (uint32_t ), (uint8_t *)mask_key);
1436
+ int __unused result =
1437
+ SecRandomCopyBytes (kSecRandomDefault , sizeof (uint32_t ), (uint8_t *)mask_key);
1429
1438
assert (result == 0 );
1430
1439
frame_buffer_size += sizeof (uint32_t );
1431
1440
0 commit comments