Search code examples
xcodecompiler-warningssuppress-warnings

How to hide warnings about ignored attributes in Xcode?


How can I disable the following warning in Xcode?

'packed' attribute ignored for field of type 'uchar' (aka 'unsigned char')

I browsed through the list of warning switches but couldn't find anything regarding this, also disabled pedantic warnings without success.


Solution

  • Use -Wignored-attributes

    #pragma clang diagnostic push
    #pragma clang diagnostic ignored "-Wignored-attributes"
    your code
    #pragma clang diagnostic pop
    

    You can find a full list on http://fuckingclangwarnings.com/