From e69e7f621d42039fd0d2f75fc0503e427f889cfa Mon Sep 17 00:00:00 2001 From: badaix Date: Fri, 7 Jun 2024 09:30:37 +0200 Subject: [PATCH] Fix warnings --- test/test_main.cpp | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/test/test_main.cpp b/test/test_main.cpp index ebde4f76..0eb53191 100644 --- a/test/test_main.cpp +++ b/test/test_main.cpp @@ -1,6 +1,6 @@ /*** This file is part of snapcast - Copyright (C) 2014-2021 Johannes Pohl + Copyright (C) 2014-2024 Johannes Pohl This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -16,7 +16,18 @@ along with this program. If not, see . ***/ -#define CATCH_CONFIG_MAIN +#ifndef NOMINMAX +#define NOMINMAX +#endif // NOMINMAX + +#if defined(__GNUC__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wmaybe-uninitialized" +#include "catch_amalgamated.hpp" +#pragma GCC diagnostic pop +#else +#include "catch_amalgamated.hpp" +#endif // prototype/interface header file @@ -29,16 +40,11 @@ #include "server/streamreader/stream_uri.hpp" // 3rd party headers -#pragma GCC diagnostic push -#if defined(__GNUC__) && !defined(__clang__) -#pragma GCC diagnostic ignored "-Wmaybe-uninitialized" -#endif -#include "catch_amalgamated.hpp" -#pragma GCC diagnostic pop // standard headers #include +#define CATCH_CONFIG_MAIN using namespace std;