From: Matthias Maier Date: Mon, 13 May 2019 15:45:33 +0000 (-0500) Subject: cppcheck: avoid an unused variable X-Git-Tag: v9.1.0-rc1~24^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0c219f906353f42ad080724b479fd14e5ffdf1fe;p=dealii.git cppcheck: avoid an unused variable --- diff --git a/source/base/table_handler.cc b/source/base/table_handler.cc index 6342e4f57f..a126973c83 100644 --- a/source/base/table_handler.cc +++ b/source/base/table_handler.cc @@ -752,13 +752,15 @@ TableHandler::n_rows() const return 0; std::map::const_iterator col_iter = columns.begin(); - unsigned int n = col_iter->second.entries.size(); - std::string first_name = col_iter->first; + unsigned int n = col_iter->second.entries.size(); +#ifdef DEBUG + std::string first_name = col_iter->first; for (++col_iter; col_iter != columns.end(); ++col_iter) Assert(col_iter->second.entries.size() == n, ExcWrongNumberOfDataEntries( col_iter->first, col_iter->second.entries.size(), first_name, n)); +#endif return n; }