Silence some unused argument warnings.
This commit is contained in:
parent
1b794a44f6
commit
1f42957755
@ -112,7 +112,7 @@ public:
|
||||
* regard to x. For scalar evaluations (which do not consider derivatives), this
|
||||
* method does nothing.
|
||||
*/
|
||||
static Scalar createVariable(Scalar value, int varIdx)
|
||||
static Scalar createVariable(Scalar value, int /* varIdx */)
|
||||
{ return value; }
|
||||
|
||||
/*!
|
||||
|
@ -77,6 +77,7 @@ inline bool CheckDefined(const T &value)
|
||||
auto tmp = VALGRIND_CHECK_MEM_IS_DEFINED(&value, sizeof(T));
|
||||
return tmp == 0;
|
||||
#else
|
||||
static_cast<void>(value);
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
@ -113,6 +114,8 @@ inline bool CheckDefined(const T *value, int size)
|
||||
auto tmp = VALGRIND_CHECK_MEM_IS_DEFINED(value, size*sizeof(T));
|
||||
return tmp == 0;
|
||||
#else
|
||||
static_cast<void>(value);
|
||||
static_cast<void>(size);
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
@ -140,6 +143,7 @@ inline void SetUndefined(const T &value)
|
||||
#if !defined NDEBUG && HAVE_VALGRIND
|
||||
auto OPM_UNUSED result = VALGRIND_MAKE_MEM_UNDEFINED(&value, sizeof(T));
|
||||
#endif
|
||||
static_cast<void>(value);
|
||||
}
|
||||
|
||||
/*!
|
||||
@ -166,6 +170,8 @@ inline void SetUndefined(const T *value, int size)
|
||||
#if !defined NDEBUG && HAVE_VALGRIND
|
||||
auto OPM_UNUSED result = VALGRIND_MAKE_MEM_UNDEFINED(value, size*sizeof(T));
|
||||
#endif
|
||||
static_cast<void>(value);
|
||||
static_cast<void>(size);
|
||||
}
|
||||
|
||||
/*!
|
||||
@ -190,6 +196,7 @@ inline void SetDefined(const T &value)
|
||||
#if !defined NDEBUG && HAVE_VALGRIND
|
||||
auto OPM_UNUSED result = VALGRIND_MAKE_MEM_DEFINED(&value, sizeof(T));
|
||||
#endif
|
||||
static_cast<void>(value);
|
||||
}
|
||||
|
||||
/*!
|
||||
@ -216,6 +223,8 @@ inline void SetDefined(const T *value, int n)
|
||||
#if !defined NDEBUG && HAVE_VALGRIND
|
||||
auto OPM_UNUSED result = VALGRIND_MAKE_MEM_DEFINED(value, n*sizeof(T));
|
||||
#endif
|
||||
static_cast<void>(value);
|
||||
static_cast<void>(n);
|
||||
}
|
||||
|
||||
/*!
|
||||
@ -240,6 +249,7 @@ inline void SetNoAccess(const T &value)
|
||||
#if !defined NDEBUG && HAVE_VALGRIND
|
||||
auto OPM_UNUSED result = VALGRIND_MAKE_MEM_NOACCESS(&value, sizeof(T));
|
||||
#endif
|
||||
static_cast<void>(value);
|
||||
}
|
||||
|
||||
/*!
|
||||
@ -264,6 +274,8 @@ inline void SetNoAccess(const T *value, int size)
|
||||
#if !defined NDEBUG && HAVE_VALGRIND
|
||||
auto OPM_UNUSED result = VALGRIND_MAKE_MEM_NOACCESS(value, size*sizeof(T));
|
||||
#endif
|
||||
static_cast<void>(value);
|
||||
static_cast<void>(size);
|
||||
}
|
||||
|
||||
} // namespace Valgrind
|
||||
|
@ -58,8 +58,8 @@ public:
|
||||
*
|
||||
* This function throws a warning when called: "No init routine defined - make sure that this is not necessary!"
|
||||
*/
|
||||
static void init(Scalar tempMin, Scalar tempMax, unsigned nTemp,
|
||||
Scalar pressMin, Scalar pressMax, unsigned nPress)
|
||||
static void init(Scalar /* tempMin */, Scalar /* tempMax */, unsigned /* nTemp */,
|
||||
Scalar /* pressMin */, Scalar /* pressMax */, unsigned /* nPress */)
|
||||
{ }
|
||||
|
||||
/*!
|
||||
@ -123,7 +123,7 @@ public:
|
||||
* \param temperature temperature of the component in \f$\mathrm{[K]}\f$
|
||||
*/
|
||||
template <class Evaluation>
|
||||
static Evaluation vaporPressure(const Evaluation& temperature)
|
||||
static Evaluation vaporPressure(const Evaluation& /* temperature */)
|
||||
{ OPM_THROW(std::runtime_error, "Not implemented: Component::vaporPressure()"); }
|
||||
|
||||
/*!
|
||||
@ -133,7 +133,7 @@ public:
|
||||
* \param pressure pressure of component in \f$\mathrm{[Pa]}\f$
|
||||
*/
|
||||
template <class Evaluation>
|
||||
static Evaluation gasDensity(const Evaluation& temperature, const Evaluation& pressure)
|
||||
static Evaluation gasDensity(const Evaluation& /* temperature */, const Evaluation& /* pressure */)
|
||||
{ OPM_THROW(std::runtime_error, "Not implemented: Component::gasDensity()"); }
|
||||
|
||||
/*!
|
||||
@ -143,7 +143,7 @@ public:
|
||||
* \param pressure pressure of component in \f$\mathrm{[Pa]}\f$
|
||||
*/
|
||||
template <class Evaluation>
|
||||
static Evaluation liquidDensity(const Evaluation& temperature, const Evaluation& pressure)
|
||||
static Evaluation liquidDensity(const Evaluation& /* temperature */, const Evaluation& /* pressure */)
|
||||
{ OPM_THROW(std::runtime_error, "Not implemented: Component::liquidDensity()"); }
|
||||
|
||||
/*!
|
||||
@ -153,7 +153,7 @@ public:
|
||||
* \param pressure pressure of component in \f$\mathrm{[Pa]}\f$
|
||||
*/
|
||||
template <class Evaluation>
|
||||
static Evaluation gasEnthalpy(const Evaluation& temperature, const Evaluation& pressure)
|
||||
static Evaluation gasEnthalpy(const Evaluation& /* temperature */, const Evaluation& /* pressure */)
|
||||
{ OPM_THROW(std::runtime_error, "Not implemented: Component::gasEnthalpy()"); }
|
||||
|
||||
/*!
|
||||
@ -163,7 +163,7 @@ public:
|
||||
* \param pressure pressure of component in \f$\mathrm{[Pa]}\f$
|
||||
*/
|
||||
template <class Evaluation>
|
||||
static Evaluation liquidEnthalpy(const Evaluation& temperature, const Evaluation& pressure)
|
||||
static Evaluation liquidEnthalpy(const Evaluation& /* temperature */, const Evaluation& /* pressure */)
|
||||
{ OPM_THROW(std::runtime_error, "Not implemented: Component::liquidEnthalpy()"); }
|
||||
|
||||
/*!
|
||||
@ -173,7 +173,7 @@ public:
|
||||
* \param pressure pressure of component in \f$\mathrm{[Pa]}\f$
|
||||
*/
|
||||
template <class Evaluation>
|
||||
static Evaluation gasInternalEnergy(const Evaluation& temperature, const Evaluation& pressure)
|
||||
static Evaluation gasInternalEnergy(const Evaluation& /* temperature */, const Evaluation& /* pressure */)
|
||||
{ OPM_THROW(std::runtime_error, "Not implemented: Component::gasInternalEnergy()"); }
|
||||
|
||||
/*!
|
||||
@ -183,7 +183,7 @@ public:
|
||||
* \param pressure pressure of component in \f$\mathrm{[Pa]}\f$
|
||||
*/
|
||||
template <class Evaluation>
|
||||
static Evaluation liquidInternalEnergy(const Evaluation& temperature, const Evaluation& pressure)
|
||||
static Evaluation liquidInternalEnergy(const Evaluation& /* temperature */, const Evaluation& /* pressure */)
|
||||
{ OPM_THROW(std::runtime_error, "Not implemented: Component::liquidInternalEnergy()"); }
|
||||
|
||||
/*!
|
||||
@ -194,7 +194,7 @@ public:
|
||||
* \param pressure pressure of component in \f$\mathrm{[Pa]}\f$
|
||||
*/
|
||||
template <class Evaluation>
|
||||
static Evaluation gasViscosity(const Evaluation& temperature, const Evaluation& pressure)
|
||||
static Evaluation gasViscosity(const Evaluation& /* temperature */, const Evaluation& /* pressure */)
|
||||
{ OPM_THROW(std::runtime_error, "Not implemented: Component::gasViscosity()"); }
|
||||
|
||||
/*!
|
||||
@ -204,35 +204,35 @@ public:
|
||||
* \param pressure pressure of component in \f$\mathrm{[Pa]}\f$
|
||||
*/
|
||||
template <class Evaluation>
|
||||
static Evaluation liquidViscosity(const Evaluation& temperature, const Evaluation& pressure)
|
||||
static Evaluation liquidViscosity(const Evaluation& /* temperature */, const Evaluation& /* pressure */)
|
||||
{ OPM_THROW(std::runtime_error, "Not implemented: Component::liquidViscosity()"); }
|
||||
|
||||
/*!
|
||||
* \brief Thermal conductivity of the component [W/(m^2 K/m)] as a gas.
|
||||
*/
|
||||
template <class Evaluation>
|
||||
static Evaluation gasThermalConductivity(const Evaluation& temperature, const Evaluation& pressure)
|
||||
static Evaluation gasThermalConductivity(const Evaluation& /* temperature */, const Evaluation& /* pressure */)
|
||||
{ OPM_THROW(std::runtime_error, "Not implemented: Component::gasThermalConductivity()"); }
|
||||
|
||||
/*!
|
||||
* \brief Thermal conductivity of the component [W/(m^2 K/m)] as a liquid.
|
||||
*/
|
||||
template <class Evaluation>
|
||||
static Evaluation liquidThermalConductivity(const Evaluation& temperature, const Evaluation& pressure)
|
||||
static Evaluation liquidThermalConductivity(const Evaluation& /* temperature */, const Evaluation& /* pressure */)
|
||||
{ OPM_THROW(std::runtime_error, "Not implemented: Component::liquidThermalConductivity()"); }
|
||||
|
||||
/*!
|
||||
* \brief Specific isobaric heat capacity of the component [J/kg] as a gas.
|
||||
*/
|
||||
template <class Evaluation>
|
||||
static Evaluation gasHeatCapacity(const Evaluation& temperature, const Evaluation& pressure)
|
||||
static Evaluation gasHeatCapacity(const Evaluation& /* temperature */, const Evaluation& /* pressure */)
|
||||
{ OPM_THROW(std::runtime_error, "Not implemented: Component::gasHeatCapacity()"); }
|
||||
|
||||
/*!
|
||||
* \brief Specific isobaric heat capacity of the component [J/kg] as a liquid.
|
||||
*/
|
||||
template <class Evaluation>
|
||||
static Evaluation liquidHeatCapacity(const Evaluation& temperature, const Evaluation& pressure)
|
||||
static Evaluation liquidHeatCapacity(const Evaluation& /* temperature */, const Evaluation& /* pressure */)
|
||||
{ OPM_THROW(std::runtime_error, "Not implemented: Component::liquidHeatCapacity()"); }
|
||||
};
|
||||
|
||||
|
@ -84,7 +84,7 @@ public:
|
||||
* \copydoc Component::vaporPressure
|
||||
*/
|
||||
template <class Evaluation>
|
||||
static Evaluation vaporPressure(const Evaluation& T)
|
||||
static Evaluation vaporPressure(const Evaluation& /* temperature */)
|
||||
{ return 1.0; }
|
||||
|
||||
/*!
|
||||
@ -109,28 +109,28 @@ public:
|
||||
* \copydoc Component::liquidDensity
|
||||
*/
|
||||
template <class Evaluation>
|
||||
static Evaluation liquidDensity(const Evaluation& temperature, const Evaluation& pressure)
|
||||
static Evaluation liquidDensity(const Evaluation& /* temperature */, const Evaluation& /* pressure */)
|
||||
{ return 1.0; }
|
||||
|
||||
/*!
|
||||
* \copydoc Component::liquidViscosity
|
||||
*/
|
||||
template <class Evaluation>
|
||||
static Evaluation liquidViscosity(const Evaluation& temperature, const Evaluation& pressure)
|
||||
static Evaluation liquidViscosity(const Evaluation& /* temperature */, const Evaluation& /* pressure */)
|
||||
{ return 1.0; }
|
||||
|
||||
/*!
|
||||
* \copydoc Component::gasDensity
|
||||
*/
|
||||
template <class Evaluation>
|
||||
static Evaluation gasDensity(const Evaluation& temperature, const Evaluation& pressure)
|
||||
static Evaluation gasDensity(const Evaluation& /* temperature */, const Evaluation& /* pressure */)
|
||||
{ return 1.0; }
|
||||
|
||||
/*!
|
||||
* \copydoc Component::gasViscosity
|
||||
*/
|
||||
template <class Evaluation>
|
||||
static Evaluation gasViscosity(const Evaluation& temperature, const Evaluation& pressure)
|
||||
static Evaluation gasViscosity(const Evaluation& /* temperature */, const Evaluation& /* pressure */)
|
||||
{ return 1.0; }
|
||||
|
||||
|
||||
@ -138,56 +138,56 @@ public:
|
||||
* \copydoc Component::gasEnthalpy
|
||||
*/
|
||||
template <class Evaluation>
|
||||
static Evaluation gasEnthalpy(const Evaluation& temperature, const Evaluation& pressure)
|
||||
static Evaluation gasEnthalpy(const Evaluation& /* temperature */, const Evaluation& /* pressure */)
|
||||
{ return 1.0; }
|
||||
|
||||
/*!
|
||||
* \copydoc Component::liquidEnthalpy
|
||||
*/
|
||||
template <class Evaluation>
|
||||
static Evaluation liquidEnthalpy(const Evaluation& temperature, const Evaluation& pressure)
|
||||
static Evaluation liquidEnthalpy(const Evaluation& /* temperature */, const Evaluation& /* pressure */)
|
||||
{ return 1.0; }
|
||||
|
||||
/*!
|
||||
* \copydoc Component::gasInternalEnergy
|
||||
*/
|
||||
template <class Evaluation>
|
||||
static Evaluation gasInternalEnergy(const Evaluation& temperature, const Evaluation& pressure)
|
||||
static Evaluation gasInternalEnergy(const Evaluation& /* temperature */, const Evaluation& /* pressure */)
|
||||
{ return 1.0; }
|
||||
|
||||
/*!
|
||||
* \copydoc Component::liquidInternalEnergy
|
||||
*/
|
||||
template <class Evaluation>
|
||||
static Evaluation liquidInternalEnergy(const Evaluation& temperature, const Evaluation& pressure)
|
||||
static Evaluation liquidInternalEnergy(const Evaluation& /* temperature */, const Evaluation& /* pressure */)
|
||||
{ return 1.0; }
|
||||
|
||||
/*!
|
||||
* \copydoc Component::gasThermalConductivity
|
||||
*/
|
||||
template <class Evaluation>
|
||||
static Evaluation gasThermalConductivity(const Evaluation& temperature, const Evaluation& pressure)
|
||||
static Evaluation gasThermalConductivity(const Evaluation& /* temperature */, const Evaluation& /* pressure */)
|
||||
{ return 1.0; }
|
||||
|
||||
/*!
|
||||
* \copydoc Component::liquidThermalConductivity
|
||||
*/
|
||||
template <class Evaluation>
|
||||
static Evaluation liquidThermalConductivity(const Evaluation& temperature, const Evaluation& pressure)
|
||||
static Evaluation liquidThermalConductivity(const Evaluation& /* temperature */, const Evaluation& /* pressure */)
|
||||
{ return 1.0; }
|
||||
|
||||
/*!
|
||||
* \copydoc Component::gasHeatCapacity
|
||||
*/
|
||||
template <class Evaluation>
|
||||
static Evaluation gasHeatCapacity(const Evaluation& temperature, const Evaluation& pressure)
|
||||
static Evaluation gasHeatCapacity(const Evaluation& /* temperature */, const Evaluation& /* pressure */)
|
||||
{ return 1.0; }
|
||||
|
||||
/*!
|
||||
* \copydoc Component::liquidHeatCapacity
|
||||
*/
|
||||
template <class Evaluation>
|
||||
static Evaluation liquidHeatCapacity(const Evaluation& temperature, const Evaluation& pressure)
|
||||
static Evaluation liquidHeatCapacity(const Evaluation& /* temperature */, const Evaluation& /* pressure */)
|
||||
{ return 1.0; }
|
||||
};
|
||||
|
||||
|
@ -36,10 +36,10 @@
|
||||
|
||||
typedef double Scalar;
|
||||
|
||||
Scalar testFn1(Scalar x, Scalar y)
|
||||
Scalar testFn1(Scalar x, Scalar /* y */)
|
||||
{ return x; }
|
||||
|
||||
Scalar testFn2(Scalar x, Scalar y)
|
||||
Scalar testFn2(Scalar /* x */, Scalar y)
|
||||
{ return y; }
|
||||
|
||||
Scalar testFn3(Scalar x, Scalar y)
|
||||
|
Loading…
Reference in New Issue
Block a user