From: Daniel Arndt Date: Sat, 3 Feb 2018 16:46:48 +0000 (+0100) Subject: Allow detecting unused parameters using clang X-Git-Tag: v9.0.0-rc1~470^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7d64deee177975c9ab5abd2e2bbfda06d0d86aa4;p=dealii.git Allow detecting unused parameters using clang --- diff --git a/cmake/setup_compiler_flags_gnu.cmake b/cmake/setup_compiler_flags_gnu.cmake index 53f2290872..4302124fc5 100644 --- a/cmake/setup_compiler_flags_gnu.cmake +++ b/cmake/setup_compiler_flags_gnu.cmake @@ -93,8 +93,6 @@ IF(CMAKE_CXX_COMPILER_ID MATCHES "Clang") # ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-Wno-unsupported-friend") - ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-Wno-unused-parameter") - # # Disable a diagnostic that warns about potentially uninstantiated static # members. This leads to a ton of false positives. diff --git a/include/deal.II/differentiation/ad/ad_number_traits.h b/include/deal.II/differentiation/ad/ad_number_traits.h index ec0b74a37a..564523cae5 100644 --- a/include/deal.II/differentiation/ad/ad_number_traits.h +++ b/include/deal.II/differentiation/ad/ad_number_traits.h @@ -1022,8 +1022,8 @@ namespace Differentiation >::type> { static ScalarType - get_directional_derivative(const ScalarType &x, - const unsigned int direction) + get_directional_derivative(const ScalarType &/*x*/, + const unsigned int /*direction*/) { // If the AD drivers are correctly implemented then we should not get here. // This is essentially a dummy for when the ADNumberTypeCode for the original diff --git a/include/deal.II/lac/utilities.h b/include/deal.II/lac/utilities.h index 1b0496e652..683ee4e9a5 100644 --- a/include/deal.II/lac/utilities.h +++ b/include/deal.II/lac/utilities.h @@ -211,8 +211,8 @@ namespace Utilities { template - std::array,3> hyperbolic_rotation(const std::complex &f, - const std::complex &g) + std::array,3> hyperbolic_rotation(const std::complex &/*f*/, + const std::complex &/*g*/) { AssertThrow(false, ExcNotImplemented()); std::array res; @@ -244,8 +244,8 @@ namespace Utilities template - std::array,3> givens_rotation(const std::complex &f, - const std::complex &g) + std::array,3> givens_rotation(const std::complex &/*f*/, + const std::complex &/*g*/) { AssertThrow(false, ExcNotImplemented()); std::array res;