Coding - Suppress macOS system header warnings in multiple files (#997)

- Added clang diagnostic pragmas to suppress three specific warning types around macOS/iOS framework imports
- Added version-specific warning suppression for clang 20+ in the general warnings disable header
- Extended function cast warning suppression to cover clang's `-Wcast-function-type-mismatch`
This commit is contained in:
Pasukhin Dmitry
2026-01-14 21:22:11 +00:00
committed by GitHub
parent 0a1e8b7802
commit b5cd7a8410
8 changed files with 44 additions and 2 deletions

View File

@@ -17,11 +17,17 @@
#import <TargetConditionals.h>
// Suppress warnings from macOS system headers
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
#pragma clang diagnostic ignored "-Wmissing-method-return-type"
#pragma clang diagnostic ignored "-Wavailability"
#if defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE
#import <UIKit/UIKit.h>
#else
#import <Cocoa/Cocoa.h>
#endif
#pragma clang diagnostic pop
#ifndef HAVE_OBJC_ARC

View File

@@ -15,11 +15,17 @@
#import <TargetConditionals.h>
// Suppress warnings from macOS system headers
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
#pragma clang diagnostic ignored "-Wmissing-method-return-type"
#pragma clang diagnostic ignored "-Wavailability"
#if defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE
#import <UIKit/UIKit.h>
#else
#import <Cocoa/Cocoa.h>
#endif
#pragma clang diagnostic pop
#include <Cocoa_Window.hxx>