Skip to content

Commit 5255506

Browse files
committed
concurrency runtime: fix unused variable/label warnings
1 parent ab1b343 commit 5255506

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

stdlib/public/Concurrency/Actor.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -695,6 +695,7 @@ class alignas(sizeof(void *) * 2) ActiveActorStatus {
695695
JobPriority currentPriority =
696696
JobPriority((Flags & concurrency::ActorFlagConstants::PriorityMask) >>
697697
concurrency::ActorFlagConstants::PriorityShift);
698+
(void)currentPriority;
698699
assert(priority > currentPriority);
699700

700701
uint32_t flags =
@@ -1252,6 +1253,7 @@ static void defaultActorDrain(DefaultActorImpl *actor) {
12521253
bool actorLockAcquired = actor->tryLock(true);
12531254
// We always must succeed in taking the actor lock that we are draining
12541255
// because we don't have to compete with OOL jobs. See ownership rule (3)
1256+
(void)actorLockAcquired;
12551257
assert(actorLockAcquired);
12561258

12571259
// Setup a TSD for tracking current execution info

stdlib/public/Concurrency/AsyncLet.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ void swift::asyncLet_addImpl(AsyncTask *task, AsyncLet *asyncLet,
154154
updateNewChildWithParentAndGroupState(task, parentStatus, NULL);
155155
return true;
156156
});
157+
(void)addedRecord;
157158
assert(addedRecord);
158159
}
159160

stdlib/public/Concurrency/TaskGroup.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -836,7 +836,9 @@ PollResult TaskGroupImpl::poll(AsyncTask *waitingTask) {
836836
bool hasSuspended = false;
837837
bool haveRunOneChildTaskInline = false;
838838

839+
#if SWIFT_CONCURRENCY_TASK_TO_THREAD_MODEL
839840
reevaluate_if_taskgroup_has_results:;
841+
#endif
840842
auto assumed = statusMarkWaitingAssumeAcquire();
841843
if (haveRunOneChildTaskInline) {
842844
assert(assumed.readyTasks());

0 commit comments

Comments
 (0)