Skip to content

Commit

Permalink
Merge pull request #2498 from offa/gcc12_workaround
Browse files Browse the repository at this point in the history
Workaround GCC 12 warning
  • Loading branch information
gabime authored Sep 30, 2022
2 parents 523a075 + 29b24f9 commit 7fa59cf
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
11 changes: 10 additions & 1 deletion tests/includes.h
Original file line number Diff line number Diff line change
@@ -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 <chrono>
#include <cstdio>
Expand All @@ -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"
#include "spdlog/pattern_formatter.h"
11 changes: 10 additions & 1 deletion tests/main.cpp
Original file line number Diff line number Diff line change
@@ -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"
#include "catch.hpp"

#if defined (__GNUC__) && __GNUC__ == 12
# pragma GCC diagnostic pop
#endif

0 comments on commit 7fa59cf

Please sign in to comment.