@@ -652,15 +652,15 @@ class alignas(sizeof(void *) * 2) ActiveActorStatus {
652652#if SWIFT_CONCURRENCY_ENABLE_PRIORITY_ESCALATION && SWIFT_POINTER_IS_4_BYTES
653653 uint32_t Flags;
654654 dispatch_lock_t DrainLock;
655- uint32_t Unused;
655+ LLVM_ATTRIBUTE_UNUSED uint32_t Unused = {} ;
656656#elif SWIFT_CONCURRENCY_ENABLE_PRIORITY_ESCALATION && SWIFT_POINTER_IS_8_BYTES
657657 uint32_t Flags;
658658 dispatch_lock_t DrainLock;
659659#elif !SWIFT_CONCURRENCY_ENABLE_PRIORITY_ESCALATION && SWIFT_POINTER_IS_4_BYTES
660660 uint32_t Flags;
661661#else /* !SWIFT_CONCURRENCY_ENABLE_PRIORITY_ESCALATION && SWIFT_POINTER_IS_8_BYTES */
662662 uint32_t Flags;
663- uint32_t Unused;
663+ LLVM_ATTRIBUTE_UNUSED uint32_t Unused = {} ;
664664#endif
665665 JobRef FirstJob;
666666
@@ -701,7 +701,7 @@ class alignas(sizeof(void *) * 2) ActiveActorStatus {
701701 bool isIdle () const {
702702 bool isIdle = (getActorState () == Idle);
703703 if (isIdle) {
704- assert (FirstJob == NULL );
704+ assert (! FirstJob);
705705 }
706706 return isIdle;
707707 }
@@ -1063,7 +1063,7 @@ preprocessQueue(JobRef unprocessedStart, JobRef unprocessedEnd, Job *existingPro
10631063// Preprocess the queue starting from the top
10641064static Job *
10651065preprocessQueue (JobRef start) {
1066- if (start == NULL ) {
1066+ if (! start) {
10671067 return NULL ;
10681068 }
10691069
@@ -1081,7 +1081,7 @@ preprocessQueue(JobRef start) {
10811081 Job *wellFormedListStart = NULL ;
10821082
10831083 auto current = start;
1084- while (current != NULL ) {
1084+ while (current) {
10851085 if (!current.needsPreprocessing ()) {
10861086 // We can assume that everything from here onwards as being well formed
10871087 // and sorted
@@ -1241,7 +1241,7 @@ retry:;
12411241 }
12421242
12431243 assert (oldState.getMaxPriority () == JobPriority::Unspecified);
1244- assert (oldState.getFirstJob () == NULL );
1244+ assert (! oldState.getFirstJob ());
12451245 }
12461246
12471247 auto newState = oldState.withRunning ();
@@ -1352,7 +1352,7 @@ bool DefaultActorImpl::unlock(bool forceUnlock)
13521352 }
13531353
13541354 auto newState = oldState;
1355- if (oldState.getFirstJob () != NULL ) {
1355+ if (oldState.getFirstJob ()) {
13561356 // There is work left to do, don't unlock the actor
13571357 if (!forceUnlock) {
13581358 SWIFT_TASK_DEBUG_LOG (" Unlock-ing actor %p failed" , this );
@@ -1375,7 +1375,7 @@ bool DefaultActorImpl::unlock(bool forceUnlock)
13751375
13761376 if (newState.isScheduled ()) {
13771377 // See ownership rule (6) in DefaultActorImpl
1378- assert (newState.getFirstJob () != NULL );
1378+ assert (newState.getFirstJob ());
13791379 scheduleActorProcessJob (newState.getMaxPriority (), true );
13801380 } else {
13811381 // See ownership rule (5) in DefaultActorImpl
0 commit comments