From c03634733610ff6c98fe592d9bfabe764c6dba08 Mon Sep 17 00:00:00 2001 From: Kazuki Sakamoto Date: Sun, 2 Oct 2016 01:19:13 -0700 Subject: [PATCH] Suppress warnings for macOS 10.12 --- src/MacVim/MacVim.h | 2 ++ src/MacVim/gui_macvim.m | 4 ++-- src/MacVim/qlstephen/RegexKitLite.m | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/MacVim/MacVim.h b/src/MacVim/MacVim.h index adf788309e..a820f73002 100644 --- a/src/MacVim/MacVim.h +++ b/src/MacVim/MacVim.h @@ -40,6 +40,8 @@ #if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_12 // Deprecated constants in 10.12 SDK +# define NSAlertStyleCritical NSCriticalAlertStyle +# define NSAlertStyleInformational NSInformationalAlertStyle # define NSAlertStyleWarning NSWarningAlertStyle # define NSCompositingOperationSourceOver NSCompositeSourceOver # define NSControlSizeRegular NSRegularControlSize diff --git a/src/MacVim/gui_macvim.m b/src/MacVim/gui_macvim.m index 23695632b4..0931eb2cfd 100644 --- a/src/MacVim/gui_macvim.m +++ b/src/MacVim/gui_macvim.m @@ -1507,9 +1507,9 @@ // Ensure no data is on the output queue before presenting the dialog. gui_macvim_force_flush(); - int style = NSInformationalAlertStyle; + int style = NSAlertStyleInformational; if (VIM_WARNING == type) style = NSAlertStyleWarning; - else if (VIM_ERROR == type) style = NSCriticalAlertStyle; + else if (VIM_ERROR == type) style = NSAlertStyleCritical; NSMutableDictionary *attr = [NSMutableDictionary dictionaryWithObject:[NSNumber numberWithInt:style] diff --git a/src/MacVim/qlstephen/RegexKitLite.m b/src/MacVim/qlstephen/RegexKitLite.m index 924eb76299..f5b99f893c 100644 --- a/src/MacVim/qlstephen/RegexKitLite.m +++ b/src/MacVim/qlstephen/RegexKitLite.m @@ -36,6 +36,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#define OSSPINLOCK_USE_INLINED 1 + #include #include #include