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

[PLAT-4777] Fix some analyzer false positives. #789

Merged
merged 1 commit into from
Sep 3, 2020
Merged

Conversation

kstenerud
Copy link
Contributor

@kstenerud kstenerud commented Sep 2, 2020

Goal

The analyzer was issuing false warnings. We need it to be 100% clean.

Fixes #771

Design & changeset

Testing

Re-ran the analyzer

@kstenerud kstenerud changed the base branch from master to next September 2, 2020 12:46
- kr was being flagged when the logger is not set to debug. Use (void)kr; trick to mark it always in use.
- malloc() always returns NULL on OOM; we don't need to also check errno. Even though both happen in tandem, there's no way for the analyzer to know that, so just check NULL only. https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man3/malloc.3.html
@kstenerud kstenerud merged commit 8a0d267 into next Sep 3, 2020
@nickdowell nickdowell deleted the analyzer-fixes branch January 12, 2021 09:52
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.

Xcode analyzer issues reported
2 participants