change the order of OPM_UNUSED and variable name

it seems like some compilers (GCC 4.9.2?) are picky about this and
require

```c++
TypeName VariableName __attribute__ ((__unused__))
```
This commit is contained in:
Andreas Lauser 2017-01-17 13:21:16 +01:00
parent 0c8355d2ad
commit 61c501a31d
6 changed files with 33 additions and 33 deletions

View File

@ -63,42 +63,42 @@ public:
{ } { }
template <bool prepareValues = true, bool prepareGradients = true> template <bool prepareValues = true, bool prepareGradients = true>
void prepare(const ElementContext& OPM_UNUSED elemCtx, unsigned OPM_UNUSED timeIdx) void prepare(const ElementContext& elemCtx OPM_UNUSED, unsigned timeIdx OPM_UNUSED)
{ } { }
template <class QuantityCallback, class QuantityType = Scalar> template <class QuantityCallback, class QuantityType = Scalar>
QuantityType calculateValue(const ElementContext& OPM_UNUSED elemCtx, QuantityType calculateValue(const ElementContext& elemCtx OPM_UNUSED,
unsigned OPM_UNUSED fapIdx, unsigned fapIdx OPM_UNUSED,
const QuantityCallback& OPM_UNUSED quantityCallback) const const QuantityCallback& quantityCallback OPM_UNUSED) const
{ {
OPM_THROW(std::logic_error, OPM_THROW(std::logic_error,
"Generic values are not supported by the ECL black-oil simulator"); "Generic values are not supported by the ECL black-oil simulator");
} }
template <class QuantityCallback> template <class QuantityCallback>
void calculateGradient(DimVector& OPM_UNUSED quantityGrad, void calculateGradient(DimVector& quantityGrad OPM_UNUSED,
const ElementContext& OPM_UNUSED elemCtx, const ElementContext& elemCtx OPM_UNUSED,
unsigned OPM_UNUSED fapIdx, unsigned fapIdx OPM_UNUSED,
const QuantityCallback& OPM_UNUSED quantityCallback) const const QuantityCallback& quantityCallback OPM_UNUSED) const
{ {
OPM_THROW(std::logic_error, OPM_THROW(std::logic_error,
"Generic gradients are not supported by the ECL black-oil simulator"); "Generic gradients are not supported by the ECL black-oil simulator");
} }
template <class QuantityCallback> template <class QuantityCallback>
Scalar calculateBoundaryValue(const ElementContext& OPM_UNUSED elemCtx, Scalar calculateBoundaryValue(const ElementContext& elemCtx OPM_UNUSED,
unsigned OPM_UNUSED fapIdx, unsigned fapIdx OPM_UNUSED,
const QuantityCallback& OPM_UNUSED quantityCallback) const QuantityCallback& quantityCallback OPM_UNUSED)
{ {
OPM_THROW(std::logic_error, OPM_THROW(std::logic_error,
"Generic boundary values are not supported by the ECL black-oil simulator"); "Generic boundary values are not supported by the ECL black-oil simulator");
} }
template <class QuantityCallback> template <class QuantityCallback>
void calculateBoundaryGradient(DimVector& OPM_UNUSED quantityGrad, void calculateBoundaryGradient(DimVector& quantityGrad OPM_UNUSED,
const ElementContext& OPM_UNUSED elemCtx, const ElementContext& elemCtx OPM_UNUSED,
unsigned OPM_UNUSED fapIdx, unsigned fapIdx OPM_UNUSED,
const QuantityCallback& OPM_UNUSED quantityCallback) const const QuantityCallback& quantityCallback OPM_UNUSED) const
{ {
OPM_THROW(std::logic_error, OPM_THROW(std::logic_error,
"Generic boundary gradients are not supported by the ECL black-oil simulator"); "Generic boundary gradients are not supported by the ECL black-oil simulator");

View File

@ -91,7 +91,7 @@ class EclTransIntensiveQuantities
{ {
typedef typename GET_PROP_TYPE(TypeTag, ElementContext) ElementContext; typedef typename GET_PROP_TYPE(TypeTag, ElementContext) ElementContext;
protected: protected:
void update_(const ElementContext& OPM_UNUSED elemCtx, unsigned OPM_UNUSED dofIdx, unsigned OPM_UNUSED timeIdx) void update_(const ElementContext& elemCtx OPM_UNUSED, unsigned dofIdx OPM_UNUSED, unsigned timeIdx OPM_UNUSED)
{ } { }
}; };
@ -139,7 +139,7 @@ public:
* *
* \param phaseIdx The index of the fluid phase * \param phaseIdx The index of the fluid phase
*/ */
const EvalDimVector& potentialGrad(unsigned OPM_UNUSED phaseIdx) const const EvalDimVector& potentialGrad(unsigned phaseIdx OPM_UNUSED) const
{ {
OPM_THROW(Opm::NotImplemented, OPM_THROW(Opm::NotImplemented,
"The ECL transmissibility module does not provide explicit potential gradients"); "The ECL transmissibility module does not provide explicit potential gradients");
@ -160,7 +160,7 @@ public:
* *
* \param phaseIdx The index of the fluid phase * \param phaseIdx The index of the fluid phase
*/ */
const EvalDimVector& filterVelocity(unsigned OPM_UNUSED phaseIdx) const const EvalDimVector& filterVelocity(unsigned phaseIdx OPM_UNUSED) const
{ {
OPM_THROW(Opm::NotImplemented, OPM_THROW(Opm::NotImplemented,
"The ECL transmissibility module does not provide explicit filter velocities"); "The ECL transmissibility module does not provide explicit filter velocities");
@ -348,7 +348,7 @@ protected:
/*! /*!
* \brief Update the volumetric fluxes for all fluid phases on the interior faces of the context * \brief Update the volumetric fluxes for all fluid phases on the interior faces of the context
*/ */
void calculateFluxes_(const ElementContext& OPM_UNUSED elemCtx, unsigned OPM_UNUSED scvfIdx, unsigned OPM_UNUSED timeIdx) void calculateFluxes_(const ElementContext& elemCtx OPM_UNUSED, unsigned scvfIdx OPM_UNUSED, unsigned timeIdx OPM_UNUSED)
{ } { }
// transmissibility [m^3 s] // transmissibility [m^3 s]

View File

@ -136,7 +136,7 @@ class EclPeacemanWell : public BaseAuxiliaryModule<TypeTag>
// retrieve the solution dependent quantities that are only updated at the // retrieve the solution dependent quantities that are only updated at the
// beginning of a time step from the IntensiveQuantities of the model // beginning of a time step from the IntensiveQuantities of the model
void updateBeginTimestep(const IntensiveQuantities& OPM_UNUSED intQuants) void updateBeginTimestep(const IntensiveQuantities& intQuants OPM_UNUSED)
{} {}
// retrieve the solution dependent quantities from the IntensiveQuantities of the // retrieve the solution dependent quantities from the IntensiveQuantities of the

View File

@ -775,9 +775,9 @@ public:
*/ */
template <class Context> template <class Context>
void boundary(BoundaryRateVector& values, void boundary(BoundaryRateVector& values,
const Context& OPM_UNUSED context, const Context& context OPM_UNUSED,
unsigned OPM_UNUSED spaceIdx, unsigned spaceIdx OPM_UNUSED,
unsigned OPM_UNUSED timeIdx) const unsigned timeIdx OPM_UNUSED) const
{ values.setNoFlow(); } { values.setNoFlow(); }
/*! /*!

View File

@ -542,7 +542,7 @@ public:
* to the hard disk. * to the hard disk.
*/ */
template <class Restarter> template <class Restarter>
void serialize(Restarter& OPM_UNUSED res) void serialize(Restarter& res OPM_UNUSED)
{ {
/* do nothing: Everything which we need here is provided by the deck->.. */ /* do nothing: Everything which we need here is provided by the deck->.. */
} }
@ -554,7 +554,7 @@ public:
* It is the inverse of the serialize() method. * It is the inverse of the serialize() method.
*/ */
template <class Restarter> template <class Restarter>
void deserialize(Restarter& OPM_UNUSED res) void deserialize(Restarter& res OPM_UNUSED)
{ {
// initialize the wells for the current episode // initialize the wells for the current episode
beginEpisode(simulator_.gridManager().eclState(), /*wasRestarted=*/true); beginEpisode(simulator_.gridManager().eclState(), /*wasRestarted=*/true);
@ -604,7 +604,7 @@ protected:
reportStepIdx); reportStepIdx);
} }
void updateWellTopology_(unsigned OPM_UNUSED reportStepIdx, void updateWellTopology_(unsigned reportStepIdx OPM_UNUSED,
const WellCompletionsMap& wellCompletions, const WellCompletionsMap& wellCompletions,
std::vector<bool>& gridDofIsPenetrated) const std::vector<bool>& gridDofIsPenetrated) const
{ {
@ -664,7 +664,7 @@ protected:
} }
} }
void computeWellCompletionsMap_(unsigned OPM_UNUSED reportStepIdx, WellCompletionsMap& cartesianIdxToCompletionMap) void computeWellCompletionsMap_(unsigned reportStepIdx OPM_UNUSED, WellCompletionsMap& cartesianIdxToCompletionMap)
{ {
const auto& eclState = simulator_.gridManager().eclState(); const auto& eclState = simulator_.gridManager().eclState();
const auto& deckSchedule = eclState.getSchedule(); const auto& deckSchedule = eclState.getSchedule();

View File

@ -168,7 +168,7 @@ public:
/*! /*!
* \brief Called whenever a new time step must be written. * \brief Called whenever a new time step must be written.
*/ */
void beginWrite(double OPM_UNUSED t) void beginWrite(double t OPM_UNUSED)
{ {
if (enableEclOutput_() && reportStepIdx_ == 0 && collectToIORank_.isIORank() ) if (enableEclOutput_() && reportStepIdx_ == 0 && collectToIORank_.isIORank() )
EclWriterHelper<TypeTag, GridManager>::writeHeaders_(*this); EclWriterHelper<TypeTag, GridManager>::writeHeaders_(*this);
@ -180,7 +180,7 @@ public:
* For the EclWriter, this method is a no-op which throws a * For the EclWriter, this method is a no-op which throws a
* std::logic_error exception * std::logic_error exception
*/ */
void attachScalarVertexData(ScalarBuffer& OPM_UNUSED buf, std::string OPM_UNUSED name) void attachScalarVertexData(ScalarBuffer& buf OPM_UNUSED, std::string name OPM_UNUSED)
{ {
OPM_THROW(std::logic_error, OPM_THROW(std::logic_error,
"The EclWriter can only write element based quantities!"); "The EclWriter can only write element based quantities!");
@ -192,7 +192,7 @@ public:
* For the EclWriter, this method is a no-op which throws a * For the EclWriter, this method is a no-op which throws a
* std::logic_error exception * std::logic_error exception
*/ */
void attachVectorVertexData(VectorBuffer& OPM_UNUSED buf, std::string OPM_UNUSED name) void attachVectorVertexData(VectorBuffer& buf OPM_UNUSED, std::string name OPM_UNUSED)
{ {
OPM_THROW(std::logic_error, OPM_THROW(std::logic_error,
"The EclWriter can only write element based quantities!"); "The EclWriter can only write element based quantities!");
@ -201,7 +201,7 @@ public:
/* /*
* \brief Add a vertex-centered tensor field to the output. * \brief Add a vertex-centered tensor field to the output.
*/ */
void attachTensorVertexData(TensorBuffer& OPM_UNUSED buf, std::string OPM_UNUSED name) void attachTensorVertexData(TensorBuffer& buf OPM_UNUSED, std::string name OPM_UNUSED)
{ {
OPM_THROW(std::logic_error, OPM_THROW(std::logic_error,
"The EclWriter can only write element based quantities!"); "The EclWriter can only write element based quantities!");
@ -225,7 +225,7 @@ public:
* For the EclWriter, this method is a no-op which throws a * For the EclWriter, this method is a no-op which throws a
* std::logic_error exception * std::logic_error exception
*/ */
void attachVectorElementData(VectorBuffer& OPM_UNUSED buf, std::string OPM_UNUSED name) void attachVectorElementData(VectorBuffer& buf OPM_UNUSED, std::string name OPM_UNUSED)
{ {
OPM_THROW(std::logic_error, OPM_THROW(std::logic_error,
"Currently, the EclWriter can only write scalar quantities!"); "Currently, the EclWriter can only write scalar quantities!");
@ -234,7 +234,7 @@ public:
/* /*
* \brief Add a element-centered tensor field to the output. * \brief Add a element-centered tensor field to the output.
*/ */
void attachTensorElementData(TensorBuffer& OPM_UNUSED buf, std::string OPM_UNUSED name) void attachTensorElementData(TensorBuffer& buf OPM_UNUSED, std::string name OPM_UNUSED)
{ {
OPM_THROW(std::logic_error, OPM_THROW(std::logic_error,
"Currently, the EclWriter can only write scalar quantities!"); "Currently, the EclWriter can only write scalar quantities!");