Skip to content

Commit

Permalink
Concurrency: silence some unused variable warnings
Browse files Browse the repository at this point in the history
This cleans up some warnings from the unused variables. The variables
were referenced by `assert` cases only.
  • Loading branch information
compnerd committed Feb 3, 2025
1 parent 40deafb commit 8040430
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions stdlib/public/Concurrency/DispatchGlobalExecutor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,9 @@ static constexpr size_t globalQueueCacheCount =
static_cast<size_t>(JobPriority::UserInteractive) + 1;
static std::atomic<dispatch_queue_t> globalQueueCache[globalQueueCacheCount];

#if defined(__APPLE__) && !defined(SWIFT_CONCURRENCY_BACK_DEPLOYMENT)
static constexpr size_t dispatchQueueCooperativeFlag = 4;

#if defined(SWIFT_CONCURRENCY_BACK_DEPLOYMENT) || !defined(__APPLE__)
#else
extern "C" void dispatch_queue_set_width(dispatch_queue_t dq, long width);
#endif

Expand Down
2 changes: 2 additions & 0 deletions stdlib/public/Concurrency/TaskStatus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@ bool swift::addStatusRecord(AsyncTask *task, TaskStatusRecord *newRecord,
// Wait for any active lock to be released.
if (oldStatus.isStatusRecordLocked()) {
bool selfLocked = waitForStatusRecordUnlockIfNotSelfLocked(task, oldStatus);
static_cast<void>(selfLocked);
assert(!selfLocked);
}

Expand Down Expand Up @@ -368,6 +369,7 @@ static void removeStatusRecordLocked(ActiveTaskStatus status, TaskStatusRecord *
}
cur = next;
}
static_cast<void>(removedRecord);
assert(removedRecord);
}

Expand Down

0 comments on commit 8040430

Please sign in to comment.