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

Fixes static analyser issue #175

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Fixes static analyser issue #175

wants to merge 3 commits into from

Conversation

valeriyvan
Copy link
Contributor

New Pull Request Checklist

  • I have searched for a similar pull request in the project and found none

  • I have updated this branch with the latest master to avoid conflicts (via merge from master or rebase)

  • I have added the required tests to prove the fix/feature I am adding

  • I have updated the documentation (if necessary)

  • I have run the tests and they pass

  • I have run the lint and it passes (pod lib lint)

This merge request fixes / refers to the following issues: ...

Pull Request Description

...

By Apple convention method accepting NSError** should have a non-void return value to indicate whether or not an error occurred

Solves static analyser issue
@lolgear
Copy link
Collaborator

lolgear commented Dec 10, 2017

@valeriyvan

    OSStatus status = SecItemDelete((__bridge CFDictionaryRef)removeAttributes);
    if (status != errSecSuccess) {
        if (error) {
// incorrect. OSStatus is an error from different domain
            *error = [JWTErrorDescription errorWithCode:status];
        }
        return NO;
    }

@valeriyvan
Copy link
Contributor Author

Makes sense. What would be correct way to create error here?

@valeriyvan
Copy link
Contributor Author

Got it. It should be [NSError errorWithDomain:NSOSStatusErrorDomain code:status userInfo:nil]

@lolgear
Copy link
Collaborator

lolgear commented Dec 10, 2017

@valeriyvan could you check macOS tests?
I suppose that tagData == nil check is something more essential than it seems. ( It doesn't generate errors ).
In macOS it could corrupt tests.

@valeriyvan
Copy link
Contributor Author

With or without this fix macOS tests fail. Some weird memory problems.
I guess problem is not in this fix but in somewhere else.

@wanght1029
Copy link

What did you do by clicking on correct Base64 encode? Because I need to click on the string that will be generated

@lolgear lolgear mentioned this pull request Jun 8, 2021
8 tasks
@lolgear
Copy link
Collaborator

lolgear commented Jun 8, 2021

@valeriyvan
Sorry, It's been a long time since your PR was introduced.
If you don't mind I added this PR via combining it with another PR.
I guess it could be closed.
Could you check latest master?

Thanks!

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 this pull request may close these issues.

3 participants