[gtk+] Fix MacOS compiler warnings.



commit fb70bfb69be41562ea2a72084a62c8bc77f58b3c
Author: John Ralls <jralls ceridwen us>
Date:   Tue Jul 18 14:47:25 2017 -0700

    Fix MacOS compiler warnings.

 gtk/gtkclipboard-quartz.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtkclipboard-quartz.c b/gtk/gtkclipboard-quartz.c
index b1150b9..46cbca9 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);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]