Merge pull request #657 from akva2/unused_changes

Use [[maybe_unused]] and anonymous parameters instead of UNUSED macros.
This commit is contained in:
Bård Skaflestad
2021-05-14 15:50:12 +02:00
committed by GitHub
3 changed files with 8 additions and 8 deletions

View File

@@ -82,7 +82,7 @@ public:
/*!
* \brief Send the buffer asyncronously to a peer process.
*/
void send(unsigned peerRank OPM_UNUSED_NOMPI)
void send([[maybe_unused]] unsigned peerRank)
{
#if HAVE_MPI
MPI_Isend(data_,
@@ -108,7 +108,7 @@ public:
/*!
* \brief Receive the buffer syncronously from a peer rank
*/
void receive(unsigned peerRank OPM_UNUSED_NOMPI)
void receive([[maybe_unused]] unsigned peerRank)
{
#if HAVE_MPI
MPI_Recv(data_,

View File

@@ -547,12 +547,12 @@ void printUsage(const std::string& helpPreamble,
}
/// \cond 0
inline int noPositionalParameters_(std::set<std::string>& seenParams OPM_UNUSED,
inline int noPositionalParameters_(std::set<std::string>&,
std::string& errorMsg,
int argc OPM_UNUSED,
int,
const char** argv,
int paramIdx,
int posParamIdx OPM_UNUSED)
int)
{
errorMsg = std::string("Illegal parameter \"")+argv[paramIdx]+"\".";
return 0;
@@ -653,7 +653,7 @@ inline std::string parseQuotedValue_(std::string& s, const std::string& errorPre
return result;
}
inline std::string parseUnquotedValue_(std::string& s, const std::string& errorPrefix OPM_UNUSED)
inline std::string parseUnquotedValue_(std::string& s, const std::string&)
{
unsigned i;
for (i = 0; i < s.size(); ++ i)

View File

@@ -444,7 +444,7 @@ protected:
}
}
void sendIndicesToPeer_(ProcessRank peerRank OPM_UNUSED_NOMPI)
void sendIndicesToPeer_([[maybe_unused]] ProcessRank peerRank)
{
#if HAVE_MPI
const auto& foreignOverlap = foreignOverlap_.foreignOverlapWithPeer(peerRank);
@@ -489,7 +489,7 @@ protected:
delete indicesSendBuffer_[peerRank];
}
void receiveIndicesFromPeer_(ProcessRank peerRank OPM_UNUSED_NOMPI)
void receiveIndicesFromPeer_([[maybe_unused]] ProcessRank peerRank)
{
#if HAVE_MPI
// receive the number of additional indices