From 86cadec162ed7558c4d5aa8d73c2cf461f53f8c4 Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Wed, 11 Oct 2023 10:53:03 +0200 Subject: macOS: remove availability warning --- src/Fl_cocoa.mm | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm index 1a72b1de5..0420767f9 100644 --- a/src/Fl_cocoa.mm +++ b/src/Fl_cocoa.mm @@ -100,10 +100,10 @@ static int im_enabled = -1; # define NSPasteboardTypeString @"public.utf8-plain-text" #endif -// the next 5 deprecation warnings can be ignored because deprecated symbols -// are used only for macOS versions where they are not deprecated +// the next 5 deprecation/availability warnings can be legitimately ignored #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" +#pragma clang diagnostic ignored "-Wunguarded-availability" static NSString *TIFF_pasteboard_type = (fl_mac_os_version >= 100600 ? NSPasteboardTypeTIFF : NSTIFFPboardType); 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); static NSString *UTF8_pasteboard_type = (fl_mac_os_version >= 100600 ? NSPasteboardTypeString : NSStringPboardType); -static NSString *fl_filenames_pboard_type = (fl_mac_os_version >= 101300 ? NSPasteboardTypeFileURL : - NSFilenamesPboardType); +static NSString *fl_filenames_pboard_type = +#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 static bool in_nsapp_run = false; // true during execution of [NSApp run] -- cgit v1.2.3