You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Xcode if running "Analyze" on a target that includes OCMock, getting a warning about OCPartialMockObject#setupForwarderForSelector. On the last line, the call to class_addMethod about the possibility of passing a null parameter as the 3rd parameter.
* Issue erikdoe#543 about potential nil passed to class_addMethod()
OCPartialMockObject#setupForwarderForSelector
* Modified to just return if there is no existing implementation for the method
In Xcode if running "Analyze" on a target that includes OCMock, getting a warning about
OCPartialMockObject#setupForwarderForSelector
. On the last line, the call toclass_addMethod
about the possibility of passing a null parameter as the 3rd parameter.ocmock/Source/OCMock/OCPartialMockObject.m
Line 217 in 7f6e9e9
I'm not a pro at everything OCMock does, but I'm guessing we probably at least don't want to call
class_addMethod
iforiginalIMP
is NULL.Unsure if it would make sense to not bother calling
class_replaceMethod
also...?This isn't currently causing us any runtime issues - I just like to have 0 warnings in our code if we can.
-Thanks!
The text was updated successfully, but these errors were encountered: