Added extra GCC/Clang warnings.

This commit is contained in:
Branimir Karadžić
2017-09-16 16:40:13 -07:00
parent 6d4a221302
commit 5ba4d9f6d9
3 changed files with 19 additions and 5 deletions

View File

@@ -29,7 +29,7 @@ namespace bx
inline void SpScUnboundedQueue::push(void* _ptr)
{
m_last->m_next = new Node( (void*)_ptr);
m_last->m_next = new Node(_ptr);
atomicExchangePtr( (void**)&m_last, m_last->m_next);
while (m_first != m_divider)
{
@@ -106,7 +106,7 @@ namespace bx
inline void SpScBlockingUnboundedQueue::push(void* _ptr)
{
m_queue.push( (void*)_ptr);
m_queue.push(_ptr);
m_count.post();
}

View File

@@ -118,7 +118,14 @@
#define BX_NOOP(...) BX_MACRO_BLOCK_BEGIN BX_MACRO_BLOCK_END
///
#define BX_UNUSED_1(_a1) BX_MACRO_BLOCK_BEGIN (void)(true ? (void)0 : ( (void)(_a1) ) ); BX_MACRO_BLOCK_END
#define BX_UNUSED_1(_a1) \
BX_MACRO_BLOCK_BEGIN \
BX_PRAGMA_DIAGNOSTIC_PUSH(); \
BX_PRAGMA_DIAGNOSTIC_IGNORED_CLANG_GCC("-Wuseless-cast"); \
(void)(true ? (void)0 : ( (void)(_a1) ) ); \
BX_PRAGMA_DIAGNOSTIC_POP(); \
BX_MACRO_BLOCK_END
#define BX_UNUSED_2(_a1, _a2) BX_UNUSED_1(_a1); BX_UNUSED_1(_a2)
#define BX_UNUSED_3(_a1, _a2, _a3) BX_UNUSED_2(_a1, _a2); BX_UNUSED_1(_a3)
#define BX_UNUSED_4(_a1, _a2, _a3, _a4) BX_UNUSED_3(_a1, _a2, _a3); BX_UNUSED_1(_a4)

View File

@@ -476,7 +476,7 @@ function toolchain(_buildDir, _libDir)
location (path.join(_buildDir, "projects", _ACTION .. "-xp"))
end
elseif _ACTION == "xcode4" then
if "osx" == _OPTIONS["xcode"] then
@@ -723,9 +723,16 @@ function toolchain(_buildDir, _libDir)
configuration { "linux-gcc* or linux-clang*" }
buildoptions {
"-msse2",
-- "-Wdouble-promotion",
-- "-Wduplicated-branches",
"-Wduplicated-cond",
-- "-Wjump-misses-init",
"-Wlogical-op",
"-Wshadow",
-- "-Wnull-dereference",
"-Wunused-value",
"-Wundef",
"-Wno-strict-overflow",
-- "-Wuseless-cast",
}
buildoptions_cpp {
"-std=c++11",