From a0c8c381aff4d22c2bff1530ae3d8be3631209f5 Mon Sep 17 00:00:00 2001 From: Maksim Smolin Date: Tue, 22 Jan 2019 16:10:18 -0800 Subject: [PATCH] fix DebuggerBreak warning on Mac debug builds --- public/tier0/platform.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/tier0/platform.h b/public/tier0/platform.h index 64b80a8b..ec0029ef 100644 --- a/public/tier0/platform.h +++ b/public/tier0/platform.h @@ -427,7 +427,7 @@ typedef void * HINSTANCE; // On OSX, SIGTRAP doesn't really stop the thread cold when debugging. // So if being debugged, use INT3 which is precise. #ifdef OSX -#define DebuggerBreak() if ( Plat_IsInDebugSession() ) { __asm ( "int $3" ); } else { raise(SIGTRAP); } +#define DebuggerBreak() do { if ( Plat_IsInDebugSession() ) { __asm ( "int $3" ); } else { raise(SIGTRAP); } } while (0) #else #define DebuggerBreak() raise(SIGTRAP) #endif