From 64fe376ac599d4cfe4121f91dd82de7ddbbd1606 Mon Sep 17 00:00:00 2001 From: Kai Bao Date: Wed, 17 Jun 2015 10:52:48 +0200 Subject: [PATCH] Adding two more warnings to disable_warnings.h. -Wpragmas and -Wunused-but-set-variable --- opm/core/utility/platform_dependent/disable_warnings.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/opm/core/utility/platform_dependent/disable_warnings.h b/opm/core/utility/platform_dependent/disable_warnings.h index 744672a9..83f7adc8 100644 --- a/opm/core/utility/platform_dependent/disable_warnings.h +++ b/opm/core/utility/platform_dependent/disable_warnings.h @@ -54,6 +54,9 @@ // "#pragma GCC diagnostic" syntax. #if COMPATIBLE_COMPILER #pragma GCC diagnostic push +// Suppress warnings: "unknown option after ‘#pragma GCC diagnostic’ kind [-Wpragmas]". +// This is necessary because not all the compilers have the same warning options. +#pragma GCC diagnostic ignored "-Wpragmas" #pragma GCC diagnostic ignored "-Wdeprecated-declarations" #pragma GCC diagnostic ignored "-Wdeprecated-register" #pragma GCC diagnostic ignored "-Wignored-qualifiers" @@ -66,6 +69,7 @@ #pragma GCC diagnostic ignored "-Wunused-function" #pragma GCC diagnostic ignored "-Wunneeded-internal-declaration" #pragma GCC diagnostic ignored "-Wunused-private-field" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" #endif // COMPATIBLE_COMPILER #endif // SILENCE_EXTERNAL_WARNINGS