|
@@ -753,6 +753,12 @@ void GPBPrepareReadOnlySemaphore(GPBMessage *self) {
|
|
|
if (!atomic_compare_exchange_strong(&self->readOnlySemaphore_, &expected, worker)) {
|
|
|
dispatch_release(worker);
|
|
|
}
|
|
|
+#if defined(__clang_analyzer__)
|
|
|
+ // The Xcode 9.2 (and 9.3 beta) static analyzer thinks worker is leaked
|
|
|
+ // (doesn't seem to know about atomic_compare_exchange_strong); so just
|
|
|
+ // for the analyzer, let it think worker is also released in this case.
|
|
|
+ else { dispatch_release(worker); }
|
|
|
+#endif
|
|
|
}
|
|
|
|
|
|
#pragma clang diagnostic pop
|