Fix atomic_fetch_sub on workers

clangd was showing a diagnostic for this line.
This commit is contained in:
Steven Dee (Jōshin) 2024-11-29 17:46:45 -05:00
parent 5fae582e82
commit b882f72893
No known key found for this signature in database

View file

@ -1351,7 +1351,7 @@ static void CallSimpleHookIfDefined(const char *s) {
static void ReportWorkerExit(int pid, int ws) { static void ReportWorkerExit(int pid, int ws) {
int workers; int workers;
workers = atomic_fetch_sub(&shared->workers, 1) - 1; workers = atomic_fetch_sub((_Atomic(int) *)&shared->workers, 1) - 1;
if (WIFEXITED(ws)) { if (WIFEXITED(ws)) {
if (WEXITSTATUS(ws)) { if (WEXITSTATUS(ws)) {
LockInc(&shared->c.failedchildren); LockInc(&shared->c.failedchildren);