From 1caeeaaf34c143b308e83f8643c521d63af354e2 Mon Sep 17 00:00:00 2001 From: Jamie Snape Date: Thu, 26 Jan 2017 13:42:41 -0500 Subject: [PATCH 1/3] Fix signed/unsigned integer comparison warning --- include/fcl/narrowphase/distance-inl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/fcl/narrowphase/distance-inl.h b/include/fcl/narrowphase/distance-inl.h index 1372d279c..e27c1d8c9 100644 --- a/include/fcl/narrowphase/distance-inl.h +++ b/include/fcl/narrowphase/distance-inl.h @@ -162,7 +162,7 @@ typename NarrowPhaseSolver::S distance( collide(o1, tf1, o2, tf2, nsolver, collision_request, collision_result); assert(collision_result.isCollision()); - std::size_t index = -1; + std::size_t index = static_cast(-1); S max_pen_depth = std::numeric_limits::min(); for (auto i = 0u; i < collision_result.numContacts(); ++i) { From 177b2c0c89468ebc2a816edd9e1c021c407919ad Mon Sep 17 00:00:00 2001 From: Jamie Snape Date: Thu, 26 Jan 2017 13:42:41 -0500 Subject: [PATCH 2/3] Fix deprecated register storage class specifer warning --- CMakeModules/CompilerSettings.cmake | 2 +- include/fcl/math/bv/OBB-inl.h | 4 ++-- .../math/motion/taylor_model/taylor_model-inl.h | 14 +++++++------- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/CMakeModules/CompilerSettings.cmake b/CMakeModules/CompilerSettings.cmake index c62219e61..3b5020c0a 100644 --- a/CMakeModules/CompilerSettings.cmake +++ b/CMakeModules/CompilerSettings.cmake @@ -20,7 +20,7 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.1) message(FATAL_ERROR "AppleClang version must be at least 6.1!") endif() - add_definitions(-std=c++11 -W -Wall -Wextra -Wno-missing-field-initializers -Wno-unused-parameter -Wno-delete-non-virtual-dtor -Wno-overloaded-virtual -Wno-deprecated-register) + add_definitions(-std=c++11 -W -Wall -Wextra -Wno-missing-field-initializers -Wno-unused-parameter -Wno-delete-non-virtual-dtor -Wno-overloaded-virtual) if(FCL_TREAT_WARNINGS_AS_ERRORS) add_definitions(-Werror) endif() diff --git a/include/fcl/math/bv/OBB-inl.h b/include/fcl/math/bv/OBB-inl.h index 7560a79d0..0b9b132bc 100644 --- a/include/fcl/math/bv/OBB-inl.h +++ b/include/fcl/math/bv/OBB-inl.h @@ -391,7 +391,7 @@ template bool obbDisjoint(const Matrix3& B, const Vector3& T, const Vector3& a, const Vector3& b) { - register S t, s; + S t, s; const S reps = 1e-6; Matrix3 Bf = B.cwiseAbs(); @@ -521,7 +521,7 @@ bool obbDisjoint( const Vector3& a, const Vector3& b) { - register S t, s; + S t, s; const S reps = 1e-6; Matrix3 Bf = tf.linear().cwiseAbs(); diff --git a/include/fcl/math/motion/taylor_model/taylor_model-inl.h b/include/fcl/math/motion/taylor_model/taylor_model-inl.h index ed83d09d0..2ebb086e6 100644 --- a/include/fcl/math/motion/taylor_model/taylor_model-inl.h +++ b/include/fcl/math/motion/taylor_model/taylor_model-inl.h @@ -275,8 +275,8 @@ template TaylorModel& TaylorModel::operator *= (const TaylorModel& other) { assert(other.time_interval_ == time_interval_); - register S c0, c1, c2, c3; - register S c0b = other.coeffs_[0], c1b = other.coeffs_[1], c2b = other.coeffs_[2], c3b = other.coeffs_[3]; + S c0, c1, c2, c3; + S c0b = other.coeffs_[0], c1b = other.coeffs_[1], c2b = other.coeffs_[2], c3b = other.coeffs_[3]; const Interval& rb = other.r_; @@ -286,7 +286,7 @@ TaylorModel& TaylorModel::operator *= (const TaylorModel& other) c3 = coeffs_[0] * c3b + coeffs_[1] * c2b + coeffs_[2] * c1b + coeffs_[3] * c0b; Interval remainder(r_ * rb); - register S tempVal = coeffs_[1] * c3b + coeffs_[2] * c2b + coeffs_[3] * c1b; + S tempVal = coeffs_[1] * c3b + coeffs_[2] * c2b + coeffs_[3] * c1b; remainder += time_interval_->t4_ * tempVal; tempVal = coeffs_[2] * c3b + coeffs_[3] * c2b; @@ -368,12 +368,12 @@ Interval TaylorModel::getTightBound(S t0, S t1) const if(coeffs_[3] == 0) { - register S a = -coeffs_[1] / (2 * coeffs_[2]); + S a = -coeffs_[1] / (2 * coeffs_[2]); Interval polybounds; if(a <= t1 && a >= t0) { S AQ = coeffs_[0] + a * (coeffs_[1] + a * coeffs_[2]); - register S t = t0; + S t = t0; S LQ = coeffs_[0] + t * (coeffs_[1] + t * coeffs_[2]); t = t1; S RQ = coeffs_[0] + t * (coeffs_[1] + t * coeffs_[2]); @@ -392,7 +392,7 @@ Interval TaylorModel::getTightBound(S t0, S t1) const } else { - register S t = t0; + S t = t0; S LQ = coeffs_[0] + t * (coeffs_[1] + t * coeffs_[2]); t = t1; S RQ = coeffs_[0] + t * (coeffs_[1] + t * coeffs_[2]); @@ -405,7 +405,7 @@ Interval TaylorModel::getTightBound(S t0, S t1) const } else { - register S t = t0; + S t = t0; S LQ = coeffs_[0] + t * (coeffs_[1] + t * (coeffs_[2] + t * coeffs_[3])); t = t1; S RQ = coeffs_[0] + t * (coeffs_[1] + t * (coeffs_[2] + t * coeffs_[3])); From bf094eaa28ebb35fe6bb06d79c41de01b4a08bcd Mon Sep 17 00:00:00 2001 From: Jamie Snape Date: Thu, 26 Jan 2017 13:45:24 -0500 Subject: [PATCH 3/3] Remove untriggered warning exceptions --- CMakeModules/CompilerSettings.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeModules/CompilerSettings.cmake b/CMakeModules/CompilerSettings.cmake index 3b5020c0a..ebbf6138a 100644 --- a/CMakeModules/CompilerSettings.cmake +++ b/CMakeModules/CompilerSettings.cmake @@ -1,6 +1,6 @@ # GCC if(CMAKE_COMPILER_IS_GNUCXX) - add_definitions(-std=c++11 -W -Wall -g -Wextra -Wpedantic -Wno-missing-field-initializers -Wno-unused-parameter) + add_definitions(-std=c++11 -W -Wall -g -Wextra -Wpedantic -Wno-unused-parameter) if(FCL_TREAT_WARNINGS_AS_ERRORS) add_definitions(-Werror) endif() @@ -8,7 +8,7 @@ endif() # Clang if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") - add_definitions(-std=c++11 -W -Wall -Wextra -Wno-missing-field-initializers -Wno-unused-parameter -Wno-delete-non-virtual-dtor -Wno-overloaded-virtual -Wno-deprecated-register) + add_definitions(-std=c++11 -W -Wall -Wextra -Wno-unused-parameter) if(FCL_TREAT_WARNINGS_AS_ERRORS) add_definitions(-Werror) endif() @@ -20,7 +20,7 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.1) message(FATAL_ERROR "AppleClang version must be at least 6.1!") endif() - add_definitions(-std=c++11 -W -Wall -Wextra -Wno-missing-field-initializers -Wno-unused-parameter -Wno-delete-non-virtual-dtor -Wno-overloaded-virtual) + add_definitions(-std=c++11 -W -Wall -Wextra -Wno-unused-parameter) if(FCL_TREAT_WARNINGS_AS_ERRORS) add_definitions(-Werror) endif()