@@ -652,15 +652,15 @@ class alignas(sizeof(void *) * 2) ActiveActorStatus {
652
652
#if SWIFT_CONCURRENCY_ENABLE_PRIORITY_ESCALATION && SWIFT_POINTER_IS_4_BYTES
653
653
uint32_t Flags;
654
654
dispatch_lock_t DrainLock;
655
- uint32_t Unused;
655
+ LLVM_ATTRIBUTE_UNUSED uint32_t Unused = {} ;
656
656
#elif SWIFT_CONCURRENCY_ENABLE_PRIORITY_ESCALATION && SWIFT_POINTER_IS_8_BYTES
657
657
uint32_t Flags;
658
658
dispatch_lock_t DrainLock;
659
659
#elif !SWIFT_CONCURRENCY_ENABLE_PRIORITY_ESCALATION && SWIFT_POINTER_IS_4_BYTES
660
660
uint32_t Flags;
661
661
#else /* !SWIFT_CONCURRENCY_ENABLE_PRIORITY_ESCALATION && SWIFT_POINTER_IS_8_BYTES */
662
662
uint32_t Flags;
663
- uint32_t Unused;
663
+ LLVM_ATTRIBUTE_UNUSED uint32_t Unused = {} ;
664
664
#endif
665
665
JobRef FirstJob;
666
666
@@ -701,7 +701,7 @@ class alignas(sizeof(void *) * 2) ActiveActorStatus {
701
701
bool isIdle () const {
702
702
bool isIdle = (getActorState () == Idle);
703
703
if (isIdle) {
704
- assert (FirstJob == NULL );
704
+ assert (! FirstJob);
705
705
}
706
706
return isIdle;
707
707
}
@@ -1063,7 +1063,7 @@ preprocessQueue(JobRef unprocessedStart, JobRef unprocessedEnd, Job *existingPro
1063
1063
// Preprocess the queue starting from the top
1064
1064
static Job *
1065
1065
preprocessQueue (JobRef start) {
1066
- if (start == NULL ) {
1066
+ if (! start) {
1067
1067
return NULL ;
1068
1068
}
1069
1069
@@ -1081,7 +1081,7 @@ preprocessQueue(JobRef start) {
1081
1081
Job *wellFormedListStart = NULL ;
1082
1082
1083
1083
auto current = start;
1084
- while (current != NULL ) {
1084
+ while (current) {
1085
1085
if (!current.needsPreprocessing ()) {
1086
1086
// We can assume that everything from here onwards as being well formed
1087
1087
// and sorted
@@ -1241,7 +1241,7 @@ retry:;
1241
1241
}
1242
1242
1243
1243
assert (oldState.getMaxPriority () == JobPriority::Unspecified);
1244
- assert (oldState.getFirstJob () == NULL );
1244
+ assert (! oldState.getFirstJob ());
1245
1245
}
1246
1246
1247
1247
auto newState = oldState.withRunning ();
@@ -1352,7 +1352,7 @@ bool DefaultActorImpl::unlock(bool forceUnlock)
1352
1352
}
1353
1353
1354
1354
auto newState = oldState;
1355
- if (oldState.getFirstJob () != NULL ) {
1355
+ if (oldState.getFirstJob ()) {
1356
1356
// There is work left to do, don't unlock the actor
1357
1357
if (!forceUnlock) {
1358
1358
SWIFT_TASK_DEBUG_LOG (" Unlock-ing actor %p failed" , this );
@@ -1375,7 +1375,7 @@ bool DefaultActorImpl::unlock(bool forceUnlock)
1375
1375
1376
1376
if (newState.isScheduled ()) {
1377
1377
// See ownership rule (6) in DefaultActorImpl
1378
- assert (newState.getFirstJob () != NULL );
1378
+ assert (newState.getFirstJob ());
1379
1379
scheduleActorProcessJob (newState.getMaxPriority (), true );
1380
1380
} else {
1381
1381
// See ownership rule (5) in DefaultActorImpl
0 commit comments