From 2f26f66d56fb34248311069bebff3da9e22b3ddc Mon Sep 17 00:00:00 2001 From: Steven Noonan Date: Tue, 7 Jan 2020 23:28:22 -0800 Subject: [PATCH] minbase_macros: stomp stupid -Werror=empty-body on ARM64 And possibly others -- we just want to ensure that the semicolon after DebuggerBreak() doesn't seem superfluous to the compiler. Ugh. Signed-off-by: Steven Noonan --- src/public/minbase/minbase_macros.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/public/minbase/minbase_macros.h b/src/public/minbase/minbase_macros.h index efa2c5d..4e5883f 100644 --- a/src/public/minbase/minbase_macros.h +++ b/src/public/minbase/minbase_macros.h @@ -95,26 +95,26 @@ // Used to step into the debugger #ifdef _WIN64 - #define DebuggerBreak() __debugbreak() + #define DebuggerBreak() do { __debugbreak() } while(0) #elif defined(_WIN32) - #define DebuggerBreak() __asm { int 3 } + #define DebuggerBreak() do { __asm { int 3 } } while(0) #elif defined( COMPILER_GCC ) #if defined( _PS3 ) #if defined( _CERT ) #define DebuggerBreak() ((void)0) #else - #define DebuggerBreak() { __asm volatile ("tw 31,1,1"); } + #define DebuggerBreak() do { __asm volatile ("tw 31,1,1"); } while(0) #endif #elif defined(__i386__) || defined(__x86_64__) - #define DebuggerBreak() __asm__ __volatile__ ( "int $3" ); + #define DebuggerBreak() do { __asm__ __volatile__ ( "int $3" ); } while(0) #else - #define DebuggerBreak() + #define DebuggerBreak() do { } while(0) #endif #elif defined( COMPILER_SNC ) && defined( COMPILER_PS3 ) static volatile bool sPS3_SuppressAssertsInThisFile = false; // you can throw this in the debugger to temporarily disable asserts inside any particular .cpp module. #define DebuggerBreak() if (!sPS3_SuppressAssertsInThisFile) __builtin_snpause(); // from SNC Migration Guide, tw 31,1,1 #else - #define DebuggerBreak() __asm__ __volatile__ ( "int $3" ); + #define DebuggerBreak() do { __asm__ __volatile__ ( "int $3" ); } while(0) #endif #if defined(_WIN64)