Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to suppress warnings in Xcode?

In Xcode 5, is there any way to suppress warnings such as unused variables for number of files? Particularly latest Box2D 2.2.1 produces some warnings which are annoying but harmless.

like image 349
Pablo Avatar asked Nov 27 '22 09:11

Pablo


2 Answers

You can add a compiler flag -w for each affected .m file you want silenced, in the build phases for your app's target, under "Compile Sources."

like image 115
jaredsinclair Avatar answered Dec 06 '22 20:12

jaredsinclair


Select the project in the navigator, then select the target from the list. Select the Build Phases tab, then expand the Compile Sources phase. The Compiler Flags column is where you specify per-file compiler flags. Enter -Wno- to negate a warning. e.g.: -Wno-unused-parameter

like image 31
Susheel Athmakuri Avatar answered Dec 06 '22 19:12

Susheel Athmakuri