From db0baf474196e1978232be69fe92c1ddeaf79c58 Mon Sep 17 00:00:00 2001 From: Mikko Mononen Date: Sat, 10 Mar 2012 20:53:04 +0000 Subject: [PATCH] Fix for issue 192. --- Detour/Include/DetourAssert.h | 2 +- Recast/Include/RecastAssert.h | 2 +- RecastDemo/Build/Xcode/Recast.xcodeproj/project.pbxproj | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Detour/Include/DetourAssert.h b/Detour/Include/DetourAssert.h index 709ebd9..3cf6522 100644 --- a/Detour/Include/DetourAssert.h +++ b/Detour/Include/DetourAssert.h @@ -24,7 +24,7 @@ #ifdef NDEBUG // From http://cnicholson.net/2009/02/stupid-c-tricks-adventures-in-assert/ -# define dtAssert(x) do { (void)sizeof(x); } while(__LINE__==-1,false) +# define dtAssert(x) do { (void)sizeof(x); } while((void)(__LINE__==-1),false) #else # include # define dtAssert assert diff --git a/Recast/Include/RecastAssert.h b/Recast/Include/RecastAssert.h index b58b8fc..2aca0d9 100644 --- a/Recast/Include/RecastAssert.h +++ b/Recast/Include/RecastAssert.h @@ -24,7 +24,7 @@ #ifdef NDEBUG // From http://cnicholson.net/2009/02/stupid-c-tricks-adventures-in-assert/ -# define rcAssert(x) do { (void)sizeof(x); } while(__LINE__==-1,false) +# define rcAssert(x) do { (void)sizeof(x); } while((void)(__LINE__==-1),false) #else # include # define rcAssert assert diff --git a/RecastDemo/Build/Xcode/Recast.xcodeproj/project.pbxproj b/RecastDemo/Build/Xcode/Recast.xcodeproj/project.pbxproj index 7c81b7b..e7cd386 100644 --- a/RecastDemo/Build/Xcode/Recast.xcodeproj/project.pbxproj +++ b/RecastDemo/Build/Xcode/Recast.xcodeproj/project.pbxproj @@ -595,6 +595,7 @@ INSTALL_PATH = "$(HOME)/Applications"; MACOSX_DEPLOYMENT_TARGET = 10.6; OTHER_CPLUSPLUSFLAGS = ( + "-Wunused-value", "$(OTHER_CFLAGS)", "-Wshadow", "-Wreorder", @@ -623,6 +624,7 @@ MACOSX_DEPLOYMENT_TARGET = 10.6; OTHER_CFLAGS = ""; OTHER_CPLUSPLUSFLAGS = ( + "-Wunused-value", "$(OTHER_CFLAGS)", "-Wshadow", "-Wreorder",