Fix atomic_fetch_sub on workers (#1331)

clangd was showing a diagnostic for this line.
This commit is contained in:
Steven Dee (Jōshin) 2024-11-29 16:57:43 -08:00 committed by GitHub
parent cf9252f429
commit 3142758675
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

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