How can I suppress compiler warnings in Xcode 5 caused by a third-party structure?

I have a third-party structure that I imported into my project, and this leads to the fact that compiler warnings appear due to problems in its header files. I do not want to change third-party code, as it is likely to change in the near future. I found this post:

Disable warnings in Xcode from frameworks

This article talks about how to disable warnings for each file or for each project, but I'm not sure how to do this for the platform. This is because the files technically exist, but Xcode does not show them in the compiled sources section.

Does anyone know how to ignore compiler warnings for an included structure?

+6
source share
1 answer

We fixed the same problem with third-party warnings in the header files by including the problem files in our pre-compiled header (.pch) with the appropriate pragma label.

i.e.

#pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wmismatched-tags" #pragma GCC diagnostic ignored "-Wreorder" #import <ComponentKit/CKComponentViewConfiguration.h> #import <ComponentKit/CKArrayControllerChangeset.h> #import <ComponentKit/CKComponentDataSource.h> #import <ComponentKit/CKComponentBoundsAnimation.h> #pragma GCC diagnostic pop 
+3
source

Source: https://habr.com/ru/post/956981/


All Articles