Attempt to quiet unavoidable compiler warnings on Mac OS X. SDL-1.2
authorRyan C. Gordon <icculus@icculus.org>
Wed, 14 Sep 2011 03:12:48 -0400
branchSDL-1.2
changeset 5909 f99f59413a14
parent 5908 6b62ce1bff72
child 5910 87fa93acf216
Attempt to quiet unavoidable compiler warnings on Mac OS X.
src/video/quartz/SDL_QuartzVideo.m
--- a/src/video/quartz/SDL_QuartzVideo.m	Tue Sep 13 20:30:48 2011 -0400
+++ b/src/video/quartz/SDL_QuartzVideo.m	Wed Sep 14 03:12:48 2011 -0400
@@ -24,7 +24,6 @@
 #include "SDL_QuartzVideo.h"
 #include "SDL_QuartzWindow.h"
 
-
 #if __MAC_OS_X_VERSION_MIN_REQUIRED < 1060  /* Fixed in Snow Leopard */
 /*
     Add methods to get at private members of NSScreen. 
@@ -116,6 +115,16 @@
 #define MAC_OS_X_VERSION_MIN_REQUIRED 1050
 #endif
 
+/* Disable compiler warnings we can't avoid. */
+#if (defined(__GNUC__) && (__GNUC__ >= 4))
+#  if (MAC_OS_X_VERSION_MIN_REQUIRED < 1060)
+     /* use ==, not >=, so we see future warnings. */
+#    if (MAC_OS_X_VERSION_MAX_ALLOWED == 1070) 
+#      pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+#    endif
+#  endif
+#endif
+
 static inline BOOL IS_LION_OR_LATER(_THIS)
 {
 #if FORCE_OLD_API