diff --git a/tests/includes.h b/tests/includes.h index e6805280..155ae78d 100644 --- a/tests/includes.h +++ b/tests/includes.h @@ -1,6 +1,15 @@ #pragma once + +#if defined (__GNUC__) && __GNUC__ == 12 +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wmaybe-uninitialized" // Workaround for GCC 12 +#endif #include "catch.hpp" +#if defined (__GNUC__) && __GNUC__ == 12 +# pragma GCC diagnostic pop +#endif + #include "utils.h" #include #include @@ -24,4 +33,4 @@ #include "spdlog/sinks/ostream_sink.h" #include "spdlog/sinks/rotating_file_sink.h" #include "spdlog/sinks/stdout_color_sinks.h" -#include "spdlog/pattern_formatter.h" \ No newline at end of file +#include "spdlog/pattern_formatter.h" diff --git a/tests/main.cpp b/tests/main.cpp index 063e8787..4f0be406 100644 --- a/tests/main.cpp +++ b/tests/main.cpp @@ -1,2 +1,11 @@ +#if defined (__GNUC__) && __GNUC__ == 12 +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wmaybe-uninitialized" // Workaround for GCC 12 +#endif + #define CATCH_CONFIG_MAIN -#include "catch.hpp" \ No newline at end of file +#include "catch.hpp" + +#if defined (__GNUC__) && __GNUC__ == 12 +# pragma GCC diagnostic pop +#endif