diff --git a/include/bx/macros.h b/include/bx/macros.h index 34d35f9..685632b 100644 --- a/include/bx/macros.h +++ b/include/bx/macros.h @@ -50,7 +50,7 @@ # define BX_NO_VTABLE # define BX_OVERRIDE # define BX_PRINTF_ARGS(_format, _args) __attribute__ ( (format(__printf__, _format, _args) ) ) -# if BX_COMPILER_CLANG || BX_PLATFORM_IOS +# if BX_COMPILER_CLANG || BX_PLATFORM_OSX || BX_PLATFORM_IOS # define BX_THREAD /* not supported right now */ # else # define BX_THREAD __thread diff --git a/include/bx/sem.h b/include/bx/sem.h index 5141a13..cfc1cfa 100644 --- a/include/bx/sem.h +++ b/include/bx/sem.h @@ -77,6 +77,7 @@ namespace bx BX_CHECK(0 == result, "pthread_mutex_lock %d", result); # if BX_PLATFORM_NACL || BX_PLATFORM_OSX || BX_PLATFORM_IOS + BX_UNUSED(_msecs); BX_CHECK(-1 == _msecs, "NaCl, iOS and OSX don't support pthread_cond_timedwait at this moment."); while (0 == result && 0 >= m_count) diff --git a/include/bx/string.h b/include/bx/string.h index 64a8e56..6968428 100644 --- a/include/bx/string.h +++ b/include/bx/string.h @@ -37,7 +37,7 @@ namespace bx { const char* end = _str + _max; const char* ptr; - for (ptr = _str; ptr < end && *ptr != '\0'; ++ptr); + for (ptr = _str; ptr < end && *ptr != '\0'; ++ptr) {}; return ptr - _str; } @@ -117,21 +117,21 @@ namespace bx /// Skip whitespace. inline const char* strws(const char* _str) { - for (; isspace(*_str); ++_str); + for (; isspace(*_str); ++_str) {}; return _str; } /// Skip non-whitespace. inline const char* strnws(const char* _str) { - for (; !isspace(*_str); ++_str); + for (; !isspace(*_str); ++_str) {}; return _str; } /// Skip word. inline const char* strword(const char* _str) { - for (char ch = *_str++; isalnum(ch) || '_' == ch; ch = *_str++); + for (char ch = *_str++; isalnum(ch) || '_' == ch; ch = *_str++) {}; return _str-1; }