@@ -64,7 +64,9 @@ assert can have unique static variables associated with it.
6464#elif defined(_WIN32 ) && ((defined(__GNUC__ ) || defined(__clang__ )) && (defined(__arm64__ ) || defined(__aarch64__ )) )
6565 #define SDL_TriggerBreakpoint () __asm__ __volatile__ ( "brk #0xF000\n\t" )
6666#elif defined(__386__ ) && defined(__WATCOMC__ )
67- #define SDL_TriggerBreakpoint () { _asm { int 0x03 } }
67+ #define SDL_TriggerBreakpoint ()
68+ { _asm
69+ { int 0x03 } }
6870#elif defined(HAVE_SIGNAL_H ) && !defined(__WATCOMC__ )
6971 #include <signal.h>
7072 #define SDL_TriggerBreakpoint () raise(SIGTRAP)
@@ -152,12 +154,15 @@ extern DECLSPEC SDL_AssertState SDLCALL SDL_ReportAssertion(SDL_AssertData *,
152154*/
153155#define SDL_enabled_assert (condition ) \
154156 do { \
155- while ( !(condition) ) { \
157+ while ( !(condition) )
158+ { \
156159 static struct SDL_AssertData sdl_assert_data = { 0 , 0 , #condition , 0 , 0 , 0 , 0 }; \
157160 const SDL_AssertState sdl_assert_state = SDL_ReportAssertion (& sdl_assert_data , SDL_FUNCTION , SDL_FILE , SDL_LINE ); \
158- if (sdl_assert_state == SDL_ASSERTION_RETRY) { \
161+ if (sdl_assert_state == SDL_ASSERTION_RETRY )
162+ { \
159163 continue ; /* go again. */ \
160- } else if (sdl_assert_state == SDL_ASSERTION_BREAK ) { \
164+ } else if (sdl_assert_state == SDL_ASSERTION_BREAK )
165+ { \
161166 SDL_TriggerBreakpoint (); \
162167 } \
163168 break ; /* not retrying. */ \
@@ -275,7 +280,8 @@ extern DECLSPEC SDL_AssertionHandler SDLCALL SDL_GetAssertionHandler(void **puse
275280 *
276281 * ```c
277282 * const SDL_AssertData *item = SDL_GetAssertionReport();
278- * while (item) {
283+ * while (item)
284+ {
279285 * printf("'%s', %s (%s:%d), triggered %u times, always ignore: %s.\\n",
280286 * item->condition, item->function, item->filename,
281287 * item->linenum, item->trigger_count,
@@ -321,4 +327,4 @@ extern DECLSPEC void SDLCALL SDL_ResetAssertionReport(void);
321327
322328#endif /* SDL_assert_h_ */
323329
324- /* vi: set ts=4 sw=4 expandtab: */
330+ /* vi: set ts=4 sw=4 expandtab: */
0 commit comments