From a7c6f4973beba340324db75a1ee37ed6056ec1cb Mon Sep 17 00:00:00 2001 From: Robert Beckebans Date: Fri, 1 May 2015 14:57:31 +0200 Subject: [PATCH] Fixed warnings with Clang 3.6 --- neo/CMakeLists.txt | 4 ++-- neo/d3xp/SecurityCamera.cpp | 2 +- neo/d3xp/ai/AI.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/neo/CMakeLists.txt b/neo/CMakeLists.txt index 4d00a0f2..625fbf15 100644 --- a/neo/CMakeLists.txt +++ b/neo/CMakeLists.txt @@ -78,12 +78,12 @@ if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID STREQUAL "Clang") #endif() # the warnings are used for every profile anyway, so put them in a variable - set(my_warn_flags "-Wno-pragmas -Wno-unused-variable -Wno-unused-but-set-variable -Wno-switch -Wno-unused-value -Winvalid-pch -Wno-multichar") + set(my_warn_flags "-Wno-pragmas -Wno-unused-variable -Wno-switch -Wno-unused-value -Winvalid-pch -Wno-multichar") if(CMAKE_C_COMPILER_ID STREQUAL "Clang") # append clang-specific settings for warnings (the second one make sure clang doesn't complain # about unknown -W flags, like -Wno-unused-but-set-variable) - set(my_warn_flags "${my_warn_flags} -Wno-local-type-template-args -Wno-unknown-warning-option -Wno-inline-new-delete") + set(my_warn_flags "${my_warn_flags} -Wno-local-type-template-args -Wno-unknown-warning-option -Wno-inline-new-delete -Wno-switch-enum") endif() if(NOT CMAKE_CROSSCOMPILING AND ONATIVE) diff --git a/neo/d3xp/SecurityCamera.cpp b/neo/d3xp/SecurityCamera.cpp index 4bc98455..4638d21c 100644 --- a/neo/d3xp/SecurityCamera.cpp +++ b/neo/d3xp/SecurityCamera.cpp @@ -146,7 +146,7 @@ void idSecurityCamera::Spawn() } negativeSweep = ( sweepAngle < 0 ) ? true : false; - sweepAngle = abs( sweepAngle ); + sweepAngle = idMath::Fabs( sweepAngle ); scanFovCos = cos( scanFov * idMath::PI / 360.0f ); diff --git a/neo/d3xp/ai/AI.cpp b/neo/d3xp/ai/AI.cpp index db5936ad..17aa23ac 100644 --- a/neo/d3xp/ai/AI.cpp +++ b/neo/d3xp/ai/AI.cpp @@ -2465,7 +2465,7 @@ bool idAI::NewWanderDir( const idVec3& dest ) } // try other directions - if( ( gameLocal.random.RandomInt() & 1 ) || abs( deltay ) > abs( deltax ) ) + if( ( gameLocal.random.RandomInt() & 1 ) || idMath::Fabs( deltay ) > idMath::Fabs( deltax ) ) { tdir = d[ 1 ]; d[ 1 ] = d[ 2 ];