From 47ca0b333dc3c11cbf3d177d2c19716fc26c40b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20Kvalsvik?= Date: Wed, 19 Oct 2016 11:50:08 +0200 Subject: [PATCH] Remove unnecessary silencing of unused vars __attribute__ is a gcc extension (supported by clang), but isn't portable. However, this warning doesn't show up when the variables are constexpr. --- opm/parser/eclipse/Units/Units.hpp | 9 --------- 1 file changed, 9 deletions(-) diff --git a/opm/parser/eclipse/Units/Units.hpp b/opm/parser/eclipse/Units/Units.hpp index 6834d6fb9..473855c43 100644 --- a/opm/parser/eclipse/Units/Units.hpp +++ b/opm/parser/eclipse/Units/Units.hpp @@ -242,15 +242,6 @@ namespace Opm { return q / unit; } } // namespace convert - - -#ifndef HAS_ATTRIBUTE_UNUSED - namespace detail { - // Some units are sometimes unused, and generate a (potentially) large number of warnings - // Adding them here silences these warnings, and should have no side-effects - constexpr double __attribute__((unused)) unused_units = stb + liter + barsa + psia + darcy; - } // namespace detail -#endif } namespace Metric {