[CMake] Properly test if compiler supports compiler flags
[WebKit-https.git] / Tools / TestWebKitAPI / Tests / WTF / CheckedArithmeticOperations.cpp
index d6b5483..92cd4e4 100644 (file)
@@ -168,7 +168,15 @@ public:
 
         Checked<type, OverflowCrashLogger> nvalue; // to hold a not overflowed value.
         Checked<type, OverflowCrashLogger> ovalue; // to hold an overflowed value.
+
+#if COMPILER(GCC)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
+#endif
         bool unused;
+#if COMPILER(GCC)
+#pragma GCC diagnostic pop
+#endif
 
         _value = 75;
         type _largeValue = 100;