Progmasoft Git

catch3

Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.

Clonegit clone https://git.progmasoft.com/catch3

Suppressed some warnings

- signed/ unsigned mismatches
- virtual destructor on ITransientExpression (even though not needed)
Commit
dc1df297e3f1d03a36bc7c39cde33b47c8b942a5
Author
Phil Nash ·
Parents
8c95a81448d8

Files · Download .tar.gz

Changes

 include/internal/catch_decomposer.h | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/include/internal/catch_decomposer.h b/include/internal/catch_decomposer.h
index 3182b84a..6889d873 100644
--- a/include/internal/catch_decomposer.h
+++ b/include/internal/catch_decomposer.h
@@ -14,12 +14,23 @@
 
 #include <ostream>
 
+#ifdef _MSC_VER
+#pragma warning(push)
+#pragma warning(disable:4389) // '==' : signed/unsigned mismatch
+#pragma warning(disable:4018) // more "signed/unsigned mismatch"
+#pragma warning(disable:4312) // Converting int to T* using reinterpret_cast (issue on x64 platform)
+#endif
+
 namespace Catch {
 
     struct ITransientExpression {
         virtual auto isBinaryExpression() const -> bool = 0;
         virtual auto getResult() const -> bool = 0;
         virtual void streamReconstructedExpression( std::ostream &os ) const = 0;
+
+        // We don't actually need a virtual destructore, but many static analysers
+        // complain if it's not here :-(
+        virtual ~ITransientExpression() = default;
     };
 
     void formatReconstructedExpression( std::ostream &os, std::string const& lhs, std::string const& op, std::string const& rhs );
@@ -180,4 +191,8 @@ namespace Catch {
 
 } // end namespace Catch
 
+#ifdef _MSC_VER
+#pragma warning(pop)
+#endif
+
 #endif // TWOBLUECUBES_CATCH_DECOMPOSER_H_INCLUDED