Skip to content

Commit 0696788

Browse files
committed
Fixing a warning (unused variable) when building with assertions disabled.
1 parent 2cc3fa1 commit 0696788

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

GCD/GCDAsyncSocket.m

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -818,11 +818,12 @@ - (id)initWithDelegate:(id)aDelegate delegateQueue:(dispatch_queue_t)dq socketQu
818818

819819
if (sq)
820820
{
821-
NSString *assertMsg = @"The given socketQueue parameter must not be a concurrent queue.";
822-
823-
NSAssert1(sq != dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_LOW, 0), @"%@", assertMsg);
824-
NSAssert1(sq != dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), @"%@", assertMsg);
825-
NSAssert1(sq != dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), @"%@", assertMsg);
821+
NSAssert(sq != dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_LOW, 0),
822+
@"The given socketQueue parameter must not be a concurrent queue.");
823+
NSAssert(sq != dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0),
824+
@"The given socketQueue parameter must not be a concurrent queue.");
825+
NSAssert(sq != dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0),
826+
@"The given socketQueue parameter must not be a concurrent queue.");
826827

827828
dispatch_retain(sq);
828829
socketQueue = sq;

0 commit comments

Comments
 (0)