mirror of
https://github.com/Open-Cascade-SAS/OCCT.git
synced 2026-06-16 21:30:14 +08:00
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:
@@ -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
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user