Skip to content

Concurrency: silence some unused variable warnings #79116

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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