I inherited a project that contained a lot of code 320, and this code base gave me some warnings and static errors of the analyzer that I had no interest in fixing it, since I will remove this code from the project in the near future.
You can turn off static analyzer warnings for a specific file by turning on the following compiler flag:
-Xanalyzer -analyzer-disable-all-checks
You can combine this with -w to disable warnings for this file. This allowed me to move forward with the new development, while I did not have to pester the 30 warnings created by this code base.
Using the instructions above: To use Xcode to change file assembly flags:
- select target
- select build phase
- find the file to change the arguments in the Compilation Sources phase
- double click on the flag compiler cell to change
- add "-w -Xanalyzer -analyzer-disable-all-checks" to suppress clang warnings and warnings
kcharwood Nov 10 '11 at 10:56
source share