summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2023-10-11 10:53:03 +0200
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2023-10-11 10:53:03 +0200
commit86cadec162ed7558c4d5aa8d73c2cf461f53f8c4 (patch)
tree27501a3b8d139cc68f33d46bdb601fad07c3b75e
parent00aab5e69819c06cb59ae587a57f7576afd3f5cb (diff)
macOS: remove availability warning
-rw-r--r--src/Fl_cocoa.mm12
1 files 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]