Skip to content

Commit

Permalink
Make non-Clang compilers happy.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Feb 7, 2014
1 parent 129456f commit ba55cbe
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion include/SDL_assert.h
Expand Up @@ -121,12 +121,14 @@ typedef struct SDL_assert_data
extern DECLSPEC SDL_assert_state SDLCALL SDL_ReportAssertion(SDL_assert_data *,
const char *,
const char *, int)
#if defined(__clang__) && __has_feature(attribute_analyzer_noreturn)
#if defined(__clang__)
#if __has_feature(attribute_analyzer_noreturn)
/* this tells Clang's static analysis that we're a custom assert function,
and that the analyzer should assume the condition was always true past this
SDL_assert test. */
__attribute__((analyzer_noreturn))
#endif
#endif
;

/* the do {} while(0) avoids dangling else problems:
Expand Down

0 comments on commit ba55cbe

Please sign in to comment.