From: Matthias Maier Date: Wed, 15 Apr 2015 22:58:28 +0000 (+0200) Subject: Silence bogus unused-parameters|variables warnings X-Git-Tag: v8.3.0-rc1~269^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a52dd193bbf4a10b9c6c1ba6bc9669108b324b76;p=dealii.git Silence bogus unused-parameters|variables warnings --- diff --git a/include/deal.II/lac/swappable_vector.templates.h b/include/deal.II/lac/swappable_vector.templates.h index 8ac448630a..4f48e92c9f 100644 --- a/include/deal.II/lac/swappable_vector.templates.h +++ b/include/deal.II/lac/swappable_vector.templates.h @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2000 - 2014 by the deal.II authors +// Copyright (C) 2000 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -183,6 +183,8 @@ void SwappableVector::alert () template void SwappableVector::reload_vector (const bool set_flag) { + (void)set_flag; + Assert (filename != "", ExcInvalidFilename (filename)); Assert (this->size() == 0, ExcSizeNonzero()); @@ -191,9 +193,7 @@ void SwappableVector::reload_vector (const bool set_flag) tmp_in.close (); #ifdef DEAL_II_WITH_THREADS - // release the lock that was - // acquired by the calling - // functions + // release the lock that was acquired by the calling functions // set the flag if so required if (set_flag) diff --git a/include/deal.II/lac/vector.templates.h b/include/deal.II/lac/vector.templates.h index 2d46fd10dd..bcfe8b6190 100644 --- a/include/deal.II/lac/vector.templates.h +++ b/include/deal.II/lac/vector.templates.h @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 1999 - 2014 by the deal.II authors +// Copyright (C) 1999 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -1186,6 +1186,8 @@ namespace internal ResultType &result, const int depth = -1) { + (void)depth; + if (vec_size <= 4096) { // the vector is short enough so we perform the summation. first diff --git a/source/base/subscriptor.cc b/source/base/subscriptor.cc index 2a44b79632..c3a61421ba 100644 --- a/source/base/subscriptor.cc +++ b/source/base/subscriptor.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 1998 - 2014 by the deal.II authors +// Copyright (C) 1998 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -24,6 +24,7 @@ DEAL_II_NAMESPACE_OPEN +#ifdef DEBUG namespace { // create a lock that might be used to control subscription to and @@ -37,6 +38,7 @@ namespace // file). Threads::Mutex subscription_lock; } +#endif static const char *unknown_subscriber = "unknown subscriber"; diff --git a/source/base/thread_management.cc b/source/base/thread_management.cc index 78ad081df1..c2c0aad9ac 100644 --- a/source/base/thread_management.cc +++ b/source/base/thread_management.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2000 - 2014 by the deal.II authors +// Copyright (C) 2000 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -153,6 +153,7 @@ namespace Threads const char *, void *) { + (void)count; Assert (count == 1, ExcBarrierSizeNotUseful(count)); } diff --git a/source/dofs/dof_handler_policy.cc b/source/dofs/dof_handler_policy.cc index 99bbb4bd8d..3d084de04a 100644 --- a/source/dofs/dof_handler_policy.cc +++ b/source/dofs/dof_handler_policy.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 1998 - 2014 by the deal.II authors +// Copyright (C) 1998 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -2401,6 +2401,9 @@ namespace internal renumber_dofs (const std::vector &new_numbers, dealii::DoFHandler &dof_handler) const { + (void)new_numbers; + (void)dof_handler; + Assert (new_numbers.size() == dof_handler.locally_owned_dofs().n_elements(), ExcInternalError()); diff --git a/source/dofs/dof_tools.cc b/source/dofs/dof_tools.cc index 0f845024e9..6975b7e350 100644 --- a/source/dofs/dof_tools.cc +++ b/source/dofs/dof_tools.cc @@ -1407,6 +1407,7 @@ namespace DoFTools = *std::max_element (target_component.begin(), target_component.end()); const unsigned int n_target_components = max_component + 1; + (void)n_target_components; // silence possible warning about unused variable AssertDimension (dofs_per_component.size(), n_target_components); @@ -1499,6 +1500,8 @@ namespace DoFTools = *std::max_element (target_block.begin(), target_block.end()); const unsigned int n_target_blocks = max_block + 1; + (void)n_target_blocks; // silence possible warning about unused variable + const unsigned int n_blocks = fe.n_blocks(); AssertDimension (dofs_per_block.size(), n_target_blocks);