ReactiveCocoa/ReactiveCocoa — pull request #867 by kastiglione (2013-10-15 03:51:15+00:00)
Title: Prevent static analyzer false positive

Follow-up on #859.

This change is to avoid a false positive by the static analyzer, wherein it believes that `newDisposable` is released by the time `-dispose` is called outside of the `while` loop, i.e. when trying to assign a disposable to a serial disposable that has already been disposed.

It appears that ARC bridging + casting to `void *` is what confuses the static analyzer. If `existingDisposablePtr`'s type is changed to `CFTypeRef` and then only casted to `void *` for the `OSAtomicCompareAndSwapPtrBarrier` call, then the static analyzer does not complain.