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-6433] Additional compiler warnings #1092

Merged
merged 17 commits into from May 13, 2021

Conversation

nickdowell
Copy link
Contributor

Goal

Enable additional compiler warnings to detect potential issues in our code, and address any warnings raised.

Changeset

Refactors Bugsnag.xcconfig to use Xcode's warning build settings instead of raw compiler flags where available.

Enables the following additional warnings and fixes warnings raised:

  • -Wcast-qual
  • -Wcustom-atomic-properties
  • -Wdirect-ivar-access
  • -Wdocumentation-unknown-command
  • -Wformat-nonliteral
  • -Widiomatic-parentheses
  • -Wimport-preprocessor-directive-pedantic
  • -Wmissing-variable-declarations
  • -Woverriding-method-mismatch
  • -Wswitch-enum
  • -Wunused-macros

The xcconfig is no longer applied to the unit test targets in order to avoid excessive warnings there. Some unit test code would by design result in build warnings due to testing edge cases & invalid arguments.

Testing

Tested by running unit tests locally, and unit & E2E tests on CI.

@github-actions
Copy link

github-actions bot commented May 12, 2021

Infer: No issues found 🎉

OCLint: No issues found 🎉

Bugsnag.framework binary size decreased by 1,896 bytes from 1,130,168 to 1,128,272 🎉

Generated by 🚫 Danger

@nickdowell nickdowell requested a review from kattrali May 13, 2021 07:58
Bugsnag/Payload/BugsnagStackframe.m Outdated Show resolved Hide resolved
@nickdowell nickdowell merged commit 697ca1d into next May 13, 2021
@nickdowell nickdowell deleted the nickdowell/additional-warnings branch May 13, 2021 15:03
@nickdowell nickdowell mentioned this pull request May 19, 2021
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.

None yet

2 participants