From fb70bfb69be41562ea2a72084a62c8bc77f58b3c Mon Sep 17 00:00:00 2001 From: John Ralls Date: Tue, 18 Jul 2017 14:47:25 -0700 Subject: [PATCH] Fix MacOS compiler warnings. --- gtk/gtkclipboard-quartz.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/gtk/gtkclipboard-quartz.c b/gtk/gtkclipboard-quartz.c index b1150b9404..46cbca9606 100644 --- a/gtk/gtkclipboard-quartz.c +++ b/gtk/gtkclipboard-quartz.c @@ -512,8 +512,11 @@ void gtk_clipboard_clear (GtkClipboard *clipboard) { clipboard_unset (clipboard); - - [clipboard->pasteboard declareTypes:nil owner:nil]; +#ifdef AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER + [clipboard->pasteboard clearContents]; +#else + [clipboard->pasteboard declareTypes:nil owner:nil]; +#endif } static void @@ -762,7 +765,6 @@ GdkPixbuf * gtk_clipboard_wait_for_image (GtkClipboard *clipboard) { GdkAtom target = gdk_atom_intern_static_string("image/tiff"); - int i; GtkSelectionData *data; data = gtk_clipboard_wait_for_contents (clipboard, target);