3

There is some 3rd party c code included in an iOS project:

static int __attribute__((flatten)) f(struct node *node)

and Xcode gives a warning:

Unknown attribute 'flatten' ignored

What's the best way to kill this warning, without modifying the original source file?

falsetru
  • 336,967
  • 57
  • 673
  • 597
ohho
  • 49,193
  • 73
  • 246
  • 377

1 Answers1

2

Use #pragma directives around the #include of that file to ignore the appropriate warning (-Wunknown-attributes) or search your build settings and see if it the warning is listed there and disable it.

borrrden
  • 32,952
  • 8
  • 73
  • 109
  • 1
    Additionally, it might be a good idea to surround that with `#pragma clang diagnostics push` and `pop` (see the [clang manual](http://clang.llvm.org/docs/UsersManual.html#controlling-diagnostics-via-pragmas). – DarkDust Aug 06 '13 at 07:04
  • 1
    @DarkDust That is what my first suggestion was >_> – borrrden Aug 06 '13 at 07:05