include/SDL_assert.h
changeset 7736 84d89d60908f
parent 7664 6995a81e065a
child 8149 681eb46b8ac4
     1.1 --- a/include/SDL_assert.h	Sat Sep 07 13:47:14 2013 -0400
     1.2 +++ b/include/SDL_assert.h	Sat Sep 07 13:57:20 2013 -0400
     1.3 @@ -86,8 +86,14 @@
     1.4  disable assertions.
     1.5  */
     1.6  
     1.7 +#ifdef _MSC_VER  /* stupid /W4 warnings. */
     1.8 +#define SDL_NULL_WHILE_LOOP_CONDITION (-1 == __LINE__)
     1.9 +#else
    1.10 +#define SDL_NULL_WHILE_LOOP_CONDITION (0)
    1.11 +#endif
    1.12 +
    1.13  #define SDL_disabled_assert(condition) \
    1.14 -    do { (void) sizeof ((condition)); } while (0)
    1.15 +    do { (void) sizeof ((condition)); } while (SDL_NULL_WHILE_LOOP_CONDITION)
    1.16  
    1.17  typedef enum
    1.18  {
    1.19 @@ -140,7 +146,7 @@
    1.20              } \
    1.21              break; /* not retrying. */ \
    1.22          } \
    1.23 -    } while (0)
    1.24 +    } while (SDL_NULL_WHILE_LOOP_CONDITION)
    1.25  
    1.26  #endif  /* enabled assertions support code */
    1.27