5

To disable compiler warning I go to Project -> Target -> Build Settings and add flag

-w

for specific file. This flag disables all warnings.

But my intention is to exclude a specific warning, not all. I found a solution like this:

-Wnodeprecated-declarations

where deprecated-declarations is a specific warning id.

How can I determine which id has a specific warning? (In my Xcode only warning description is displayed)

David Silva
  • 1,939
  • 7
  • 28
  • 60
  • 1
    Go to the log navigator and open up the transcript. It will show you the -W code. See https://stackoverflow.com/a/21046102/1271826 or https://stackoverflow.com/a/18554532/1271826. See https://help.apple.com/xcode/mac/8.0/#/dev21d56ecd4. – Rob Sep 21 '17 at 19:02
  • @Rob, but what about warnings like: */Pods/Nimble/Sources/Nimble/Matchers/MatcherProtocols.swift:15:11: 'Matcher' is deprecated: Use to Predicate instead* ? Nimble is an external library and I would like hide such warnings. Flag *-w* for *MatcherProtocols.swift* does not work. – David Silva Sep 25 '17 at 10:55
  • Perhaps edit your question to show us what the full transcript looked like. – Rob Sep 25 '17 at 14:30

0 Answers0