Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Static Analysis results ran from XCode 9.4.1 #290

Open
3 tasks
mikelupo opened this issue Sep 25, 2018 · 2 comments · May be fixed by #315
Open
3 tasks

Static Analysis results ran from XCode 9.4.1 #290

mikelupo opened this issue Sep 25, 2018 · 2 comments · May be fixed by #315

Comments

@mikelupo
Copy link
Collaborator

Ran Static analysis on my project and saw some collateral information that I thought I'd pass on.
I realize this is older code but probably still applies.

  • OHHTTPStubs/OHHTTPStubs/Sources/OHHTTPStubs.m:46:1: Property of mutable type 'NSMutableArray' has 'copy' attribute; an immutable object will be stored instead

Memory error Group

  • OHHTTPStubs/OHHTTPStubs/Sources/Mocktail/OHHTTPStubs+Mocktail.m:44:9: nil returned from a method that is expected to return a non-null value

  • OHHTTPStubs/OHHTTPStubs/Sources/Mocktail/OHHTTPStubs+Mocktail.m:103:9: nil returned from a method that is expected to return a non-null value

  • OHHTTPStubs/OHHTTPStubs/Sources/OHHTTPStubsResponse.m:153:12: nil passed to a callee that requires a non-null 1st parameter

New Issue Checklist

Environment

  • version of OHHTTPStubs: [LIB VERSION HERE]
  • integration method you are using:
    • Cocoapods
    • Carthage
    • submodule
    • [X ] other (*Built into our Project from sources)
  • version of the tool you use: [5.1.0]

There is no ill issue seen with OHTTPStubs. This is just FYI in case you wish to investigate.
I realize this is an older version. I can't update and try again.

@AliSoftware
Copy link
Owner

Thanks for the report!
I'll try to look into it as soon as I have some free time 😉

@ZevEisenberg
Copy link

+1 I just ran static analysis and saw the first one, OHTTPStubs.m:46. Defining a property of type NSMutableArray as copy won’t do what you expect, and could lead to a crash. It’s not right now, but only because no one is doing self.stubDescriptors = someMutableArray.

@ZevEisenberg ZevEisenberg linked a pull request Sep 18, 2019 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants