Skip to content

Commit

Permalink
Prevent unused variable warning for Dune > 2.5.2
Browse files Browse the repository at this point in the history
In that case there is no need to calculate the maximum entries
of an interface. Therefore we move the declaration of variable
max_interface_entries into the compile time if branch where it
is actually used.
  • Loading branch information
blattms committed Jul 12, 2018
1 parent 8bff0b8 commit 1cc7374
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion opm/grid/cpgrid/CpGridData.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,6 @@ void CpGridData::communicateCodim(DataHandle& data, CommunicationDirection dir,
return;
}
Entity2IndexDataHandle<DataHandle, codim> data_wrapper(*this, data);
std::size_t max_interface_entries = 0;

#if DUNE_VERSION_NEWER_REV(DUNE_GRID, 2, 5, 2)
VariableSizeCommunicator<> comm(ccobj_, interface);
Expand All @@ -529,6 +528,7 @@ void CpGridData::communicateCodim(DataHandle& data, CommunicationDirection dir,
// For this we calculate an upper barrier of the number of
// data items to be send manually and use it to construct a
// VariableSizeCommunicator with sufficient buffer.
std::size_t max_interface_entries = 0;
#ifndef NDEBUG
std::size_t max_items = 0;
#endif
Expand Down

0 comments on commit 1cc7374

Please sign in to comment.