3 ms·
If you're copy-and-pasting source code into your project, you can ignore all warnings on a per-file basis (See https://stackoverflow.com/a/6921972/1176156 https
by MaxGabriel 9y ago
If you're copy-and-pasting source code into your project, you can ignore all warnings on a per-file basis (See https://stackoverflow.com/a/6921972/1176156 https://stackoverflow.com/a/6921972/1176156).
And if you're using a package manager like Cocoapods, it shouldn't be a problem.
Edit: Wait I just re-read your post again and you are using Cocoapods. Can you not just turn on "treat warnings as errors" to YES for your main project, but leave it off for your main project? Or just add `inhibit_all_warnings!` to the top of your Podfile, like on this example file: https://guides.cocoapods.org/syntax/podfile.html https://guides.cocoapods.org/syntax/podfile.html
- ryandrake 9y agoYea, I've had success with the following procedure: 1. Determine the set of warnings you're going to enable for you project, and apply them to your own code and all third-party libraries. 2. For each third party dependency, find the minimal set of warnings that, when suppressed, make them compile cleanly, and disable just those (only for that specific third party project). 3. If any of those suppressions makes you uncomfortable, submit a patch to the third party maintainer if possible :) As for #3 with open source libraries, I've seen the spectrum of attitudes from "thank you very much for the patch!" to "we don't care about compiler warnings, just turn them off" EDIT: One thing this doesn't address is third party dependencies where #including their headers from your project results in warnings. If you're a developer who writes header files that produce warnings, please take a moment to hang your head in shame.
- valuearb 9y agoThanks.