From 61c501a31d661bd37784f68b7dcde0f0273c4857 Mon Sep 17 00:00:00 2001 From: Andreas Lauser Date: Tue, 17 Jan 2017 13:21:16 +0100 Subject: [PATCH] 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__)) ``` --- ebos/ecldummygradientcalculator.hh | 30 +++++++++++++++--------------- ebos/eclfluxmodule.hh | 8 ++++---- ebos/eclpeacemanwell.hh | 2 +- ebos/eclproblem.hh | 6 +++--- ebos/eclwellmanager.hh | 8 ++++---- ebos/eclwriter.hh | 12 ++++++------ 6 files changed, 33 insertions(+), 33 deletions(-) diff --git a/ebos/ecldummygradientcalculator.hh b/ebos/ecldummygradientcalculator.hh index a23ae12ee..e1f112472 100644 --- a/ebos/ecldummygradientcalculator.hh +++ b/ebos/ecldummygradientcalculator.hh @@ -63,42 +63,42 @@ public: { } template - void prepare(const ElementContext& OPM_UNUSED elemCtx, unsigned OPM_UNUSED timeIdx) + void prepare(const ElementContext& elemCtx OPM_UNUSED, unsigned timeIdx OPM_UNUSED) { } template - QuantityType calculateValue(const ElementContext& OPM_UNUSED elemCtx, - unsigned OPM_UNUSED fapIdx, - const QuantityCallback& OPM_UNUSED quantityCallback) const + QuantityType calculateValue(const ElementContext& elemCtx OPM_UNUSED, + unsigned fapIdx OPM_UNUSED, + const QuantityCallback& quantityCallback OPM_UNUSED) const { OPM_THROW(std::logic_error, "Generic values are not supported by the ECL black-oil simulator"); } template - void calculateGradient(DimVector& OPM_UNUSED quantityGrad, - const ElementContext& OPM_UNUSED elemCtx, - unsigned OPM_UNUSED fapIdx, - const QuantityCallback& OPM_UNUSED quantityCallback) const + void calculateGradient(DimVector& quantityGrad OPM_UNUSED, + const ElementContext& elemCtx OPM_UNUSED, + unsigned fapIdx OPM_UNUSED, + const QuantityCallback& quantityCallback OPM_UNUSED) const { OPM_THROW(std::logic_error, "Generic gradients are not supported by the ECL black-oil simulator"); } template - Scalar calculateBoundaryValue(const ElementContext& OPM_UNUSED elemCtx, - unsigned OPM_UNUSED fapIdx, - const QuantityCallback& OPM_UNUSED quantityCallback) + Scalar calculateBoundaryValue(const ElementContext& elemCtx OPM_UNUSED, + unsigned fapIdx OPM_UNUSED, + const QuantityCallback& quantityCallback OPM_UNUSED) { OPM_THROW(std::logic_error, "Generic boundary values are not supported by the ECL black-oil simulator"); } template - void calculateBoundaryGradient(DimVector& OPM_UNUSED quantityGrad, - const ElementContext& OPM_UNUSED elemCtx, - unsigned OPM_UNUSED fapIdx, - const QuantityCallback& OPM_UNUSED quantityCallback) const + void calculateBoundaryGradient(DimVector& quantityGrad OPM_UNUSED, + const ElementContext& elemCtx OPM_UNUSED, + unsigned fapIdx OPM_UNUSED, + const QuantityCallback& quantityCallback OPM_UNUSED) const { OPM_THROW(std::logic_error, "Generic boundary gradients are not supported by the ECL black-oil simulator"); diff --git a/ebos/eclfluxmodule.hh b/ebos/eclfluxmodule.hh index 8d3bd1853..b1ad3bedc 100644 --- a/ebos/eclfluxmodule.hh +++ b/ebos/eclfluxmodule.hh @@ -91,7 +91,7 @@ class EclTransIntensiveQuantities { typedef typename GET_PROP_TYPE(TypeTag, ElementContext) ElementContext; 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 */ - const EvalDimVector& potentialGrad(unsigned OPM_UNUSED phaseIdx) const + const EvalDimVector& potentialGrad(unsigned phaseIdx OPM_UNUSED) const { OPM_THROW(Opm::NotImplemented, "The ECL transmissibility module does not provide explicit potential gradients"); @@ -160,7 +160,7 @@ public: * * \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, "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 */ - 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] diff --git a/ebos/eclpeacemanwell.hh b/ebos/eclpeacemanwell.hh index 34949fd84..34a95fbc2 100644 --- a/ebos/eclpeacemanwell.hh +++ b/ebos/eclpeacemanwell.hh @@ -136,7 +136,7 @@ class EclPeacemanWell : public BaseAuxiliaryModule // retrieve the solution dependent quantities that are only updated at the // 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 diff --git a/ebos/eclproblem.hh b/ebos/eclproblem.hh index 8b8f6e9fb..ec65f6522 100644 --- a/ebos/eclproblem.hh +++ b/ebos/eclproblem.hh @@ -775,9 +775,9 @@ public: */ template void boundary(BoundaryRateVector& values, - const Context& OPM_UNUSED context, - unsigned OPM_UNUSED spaceIdx, - unsigned OPM_UNUSED timeIdx) const + const Context& context OPM_UNUSED, + unsigned spaceIdx OPM_UNUSED, + unsigned timeIdx OPM_UNUSED) const { values.setNoFlow(); } /*! diff --git a/ebos/eclwellmanager.hh b/ebos/eclwellmanager.hh index 746250be3..d91a49fe7 100644 --- a/ebos/eclwellmanager.hh +++ b/ebos/eclwellmanager.hh @@ -542,7 +542,7 @@ public: * to the hard disk. */ template - void serialize(Restarter& OPM_UNUSED res) + void serialize(Restarter& res OPM_UNUSED) { /* 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. */ template - void deserialize(Restarter& OPM_UNUSED res) + void deserialize(Restarter& res OPM_UNUSED) { // initialize the wells for the current episode beginEpisode(simulator_.gridManager().eclState(), /*wasRestarted=*/true); @@ -604,7 +604,7 @@ protected: reportStepIdx); } - void updateWellTopology_(unsigned OPM_UNUSED reportStepIdx, + void updateWellTopology_(unsigned reportStepIdx OPM_UNUSED, const WellCompletionsMap& wellCompletions, std::vector& 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& deckSchedule = eclState.getSchedule(); diff --git a/ebos/eclwriter.hh b/ebos/eclwriter.hh index b5c22cabb..ad51b8fc5 100644 --- a/ebos/eclwriter.hh +++ b/ebos/eclwriter.hh @@ -168,7 +168,7 @@ public: /*! * \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() ) EclWriterHelper::writeHeaders_(*this); @@ -180,7 +180,7 @@ public: * For the EclWriter, this method is a no-op which throws a * 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, "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 * 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, "The EclWriter can only write element based quantities!"); @@ -201,7 +201,7 @@ public: /* * \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, "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 * 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, "Currently, the EclWriter can only write scalar quantities!"); @@ -234,7 +234,7 @@ public: /* * \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, "Currently, the EclWriter can only write scalar quantities!");