macOS: remove availability warning

This commit is contained in:
ManoloFLTK
2023-10-11 10:53:03 +02:00
parent 00aab5e698
commit 86cadec162
+8 -4
View File
@@ -100,10 +100,10 @@ static int im_enabled = -1;
# define NSPasteboardTypeString @"public.utf8-plain-text" # define NSPasteboardTypeString @"public.utf8-plain-text"
#endif #endif
// the next 5 deprecation warnings can be ignored because deprecated symbols // the next 5 deprecation/availability warnings can be legitimately ignored
// are used only for macOS versions where they are not deprecated
#pragma clang diagnostic push #pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations" #pragma clang diagnostic ignored "-Wdeprecated-declarations"
#pragma clang diagnostic ignored "-Wunguarded-availability"
static NSString *TIFF_pasteboard_type = (fl_mac_os_version >= 100600 ? NSPasteboardTypeTIFF : static NSString *TIFF_pasteboard_type = (fl_mac_os_version >= 100600 ? NSPasteboardTypeTIFF :
NSTIFFPboardType); NSTIFFPboardType);
static NSString *PDF_pasteboard_type = (fl_mac_os_version >= 100600 ? NSPasteboardTypePDF : static NSString *PDF_pasteboard_type = (fl_mac_os_version >= 100600 ? NSPasteboardTypePDF :
@@ -112,8 +112,12 @@ static NSString *PICT_pasteboard_type = (fl_mac_os_version >= 100600 ? @"com.app
NSPICTPboardType); NSPICTPboardType);
static NSString *UTF8_pasteboard_type = (fl_mac_os_version >= 100600 ? NSPasteboardTypeString : static NSString *UTF8_pasteboard_type = (fl_mac_os_version >= 100600 ? NSPasteboardTypeString :
NSStringPboardType); NSStringPboardType);
static NSString *fl_filenames_pboard_type = (fl_mac_os_version >= 101300 ? NSPasteboardTypeFileURL : static NSString *fl_filenames_pboard_type =
NSFilenamesPboardType); #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_13
(fl_mac_os_version >= 101300 ? NSPasteboardTypeFileURL : NSFilenamesPboardType);
#else
NSFilenamesPboardType;
#endif
#pragma clang diagnostic pop #pragma clang diagnostic pop
static bool in_nsapp_run = false; // true during execution of [NSApp run] static bool in_nsapp_run = false; // true during execution of [NSApp run]