Clang nullability warnings and how to approach them
<p>Recently I turned on <code>CLANG_WARN_NULLABLE_TO_NONNULL_CONVERSION</code> in Xcode and I am overwhelmed with nullability related warnings in my Objective-C code.  The one warning type that is most prevalent is <code>Implicit conversion from nullable pointer 'TypeA * _Nullable' to non-nullable pointer type 'TypeA * _Nonnull'</code>.  </p>

<p>I started my attempt to remove with these warnings by creating a local of the same type in a method as described here.
<a href="https://www.mail-archive.com/xcode-users%40lists.apple.com/msg02260.html" rel="nofollow">https://www.mail-archive.com/xcode-users%40lists.apple.com/msg02260.html</a>
This article says by first using a local, that object is of attribute unspecified nullable, so it can be used as legit parameter to the methods expecting nonnull.</p>

<p>But I feel this is a cop out move and really not solving the issue in any beneficial way.</p>

<p>Has anyone gone through this exercise already?  I would be grateful if you can share a strategy that you took.</p>