From 459c86dee33698c032cb3ab366e139c71277e3dc Mon Sep 17 00:00:00 2001 From: balr0g Date: Fri, 18 Sep 2015 16:00:03 -0400 Subject: [PATCH] Fix build with Xcode 7 (nw) --- makefile | 4 +--- scripts/genie.lua | 5 +++++ src/osd/modules/debugger/osx/debugview.m | 2 +- src/osd/modules/debugger/osx/pointsviewer.m | 4 ++-- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/makefile b/makefile index 2bd0b0bbac1..219df903ec8 100644 --- a/makefile +++ b/makefile @@ -718,21 +718,19 @@ CHECK_CLANG := else GCC_VERSION := $(shell $(subst @,,$(CC)) -dumpversion 2> /dev/null) ifneq ($(OS),solaris) -CLANG_VERSION := $(shell clang --version 2> /dev/null | head -n 1 | grep '[0-9]\.[0-9]' -o | tail -n 1) +CLANG_VERSION := $(shell clang --version 2> /dev/null | head -n 1 | grep -e 'version [0-9]\.[0-9]\(\.[0-9]\)\?' -o | grep -e '[0-9]\.[0-9]\(\.[0-9]\)\?' -o | tail -n 1) endif PYTHON_AVAILABLE := $(shell $(PYTHON) --version > /dev/null 2>&1 && echo python) CHECK_CLANG := $(shell gcc --version 2> /dev/null | grep 'clang' | head -n 1) endif ifeq ($(TARGETOS),macosx) -ifneq (,$(findstring 3.,$(CLANG_VERSION))) ifeq ($(ARCHITECTURE),_x64) ARCHITECTURE := _x64_clang else ARCHITECTURE := _x86_clang endif endif -endif ifneq ($(PYTHON_AVAILABLE),python) $(error Python is not available in path) diff --git a/scripts/genie.lua b/scripts/genie.lua index e7e1342c050..debf9b19e4d 100644 --- a/scripts/genie.lua +++ b/scripts/genie.lua @@ -1000,6 +1000,11 @@ end "-Wno-extern-c-compat", } end + if (version >= 70000) then + buildoptions { + "-Wno-tautological-undefined-compare", + } + end else if (version == 40201) then buildoptions { diff --git a/src/osd/modules/debugger/osx/debugview.m b/src/osd/modules/debugger/osx/debugview.m index 13a9fbc7e04..c5b0a1c5431 100644 --- a/src/osd/modules/debugger/osx/debugview.m +++ b/src/osd/modules/debugger/osx/debugview.m @@ -404,7 +404,7 @@ static void debugwin_view_update(debug_view &view, void *osdprivate) [text addAttribute:NSFontAttributeName value:font range:run]; NSPasteboard *const board = [NSPasteboard generalPasteboard]; [board declareTypes:[NSArray arrayWithObject:NSRTFPboardType] owner:nil]; - [board setData:[text RTFFromRange:run documentAttributes:nil] forType:NSRTFPboardType]; + [board setData:[text RTFFromRange:run documentAttributes:@{}] forType:NSRTFPboardType]; [text deleteCharactersInRange:run]; } diff --git a/src/osd/modules/debugger/osx/pointsviewer.m b/src/osd/modules/debugger/osx/pointsviewer.m index 14bb2f32775..c9301eb2894 100644 --- a/src/osd/modules/debugger/osx/pointsviewer.m +++ b/src/osd/modules/debugger/osx/pointsviewer.m @@ -74,7 +74,7 @@ [breakScroll setBorderType:NSNoBorder]; [breakScroll setDocumentView:breakView]; [breakView release]; - breakTab = [[NSTabViewItem alloc] initWithIdentifier:nil]; + breakTab = [[NSTabViewItem alloc] initWithIdentifier:@""]; [breakTab setView:breakScroll]; [breakScroll release]; @@ -89,7 +89,7 @@ [watchScroll setBorderType:NSNoBorder]; [watchScroll setDocumentView:watchView]; [watchView release]; - watchTab = [[NSTabViewItem alloc] initWithIdentifier:nil]; + watchTab = [[NSTabViewItem alloc] initWithIdentifier:@""]; [watchTab setView:watchScroll]; [watchScroll release];