From adb66f55a7f99147a8e3b4f9781399d9262d4e09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ho=C5=99e=C5=88ovsk=C3=BD?= Date: Fri, 2 Jun 2017 19:10:57 +0200 Subject: [PATCH] Don't include warning headers from catch_xmlwriter.hpp This prevents Catch from disabling `Wpadded` for Clang inside test files (files that do not define either `CATCH_CONFIG_MAIN` or `CATCH_CONFIG_RUNNER`). catch_suppress_warnings.h and catch_reenable_warnings.h should be included only once*, so that the stitching script includes them as the first and last header respectively, since it only includes each header once. This caused a bug, where the first one was included properly, but the second one was included prematurely, from catch_xmlwriter.hpp, and thus was guarded by `CATCH_IMPL`. * At least until the stitching script is changed to accomodate common warning disabling header. Fixes #871 --- include/internal/catch_xmlwriter.hpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/internal/catch_xmlwriter.hpp b/include/internal/catch_xmlwriter.hpp index ae59627c..224c23a5 100644 --- a/include/internal/catch_xmlwriter.hpp +++ b/include/internal/catch_xmlwriter.hpp @@ -10,7 +10,6 @@ #include "catch_stream.h" #include "catch_compiler_capabilities.h" -#include "catch_suppress_warnings.h" #include #include @@ -241,6 +240,5 @@ namespace Catch { }; } -#include "catch_reenable_warnings.h" #endif // TWOBLUECUBES_CATCH_XMLWRITER_HPP_INCLUDED