From b4f0855410132d39eaa7c28fa4a4ec5aa2c7d7a2 Mon Sep 17 00:00:00 2001 From: John Wellbelove Date: Wed, 28 Dec 2016 13:12:22 +0000 Subject: [PATCH] Fixed GCC warnings --- test/test_io_port.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/test/test_io_port.cpp b/test/test_io_port.cpp index 62487683..656ce1a3 100644 --- a/test/test_io_port.cpp +++ b/test/test_io_port.cpp @@ -32,7 +32,12 @@ SOFTWARE. #include -#pragma warning(disable:4101) // Unused variable. +#if defined(ETL_COMPILER_GCC) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wunused-variable" +#else + #pragma warning(disable:4101) // Unused variable. +#endif template struct serial_port @@ -113,3 +118,7 @@ namespace } }; } + +#if defined(ETL_COMPILER_GCC) + #pragma GCC diagnostic pop +#endif