https://git.reactos.org/?p=reactos.git;a=commitdiff;h=1c0a2a35e7f40f40d3827…
commit 1c0a2a35e7f40f40d382730d4467cc03dc43a2d6
Author: Victor Perevertkin <victor(a)perevertkin.ru>
AuthorDate: Sat Aug 17 23:05:45 2019 +0300
Commit: Victor Perevertkin <victor(a)perevertkin.ru>
CommitDate: Tue Aug 20 15:05:47 2019 +0200
[APITESTS] Ignore GCC8 warnings where we test some crazy stuff
---
modules/rostests/apitests/atl/CAtlArray.cpp | 5 +++++
modules/rostests/apitests/crt/dll_startup.cpp | 5 +++++
modules/rostests/apitests/crt/sprintf.c | 5 ++++-
modules/rostests/apitests/crt/static_construct.cpp | 6 +++++-
4 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/modules/rostests/apitests/atl/CAtlArray.cpp
b/modules/rostests/apitests/atl/CAtlArray.cpp
index 8d4bc70dda0..ef7828ed951 100644
--- a/modules/rostests/apitests/atl/CAtlArray.cpp
+++ b/modules/rostests/apitests/atl/CAtlArray.cpp
@@ -6,6 +6,11 @@
* Copyright 2019 Mark Jansen (mark.jansen(a)reactos.org)
*/
+#if defined(__GNUC__) && __GNUC__ >= 7
+// this is an intended behaviour
+#pragma GCC diagnostic ignored "-Wclass-memaccess"
+#endif
+
#ifdef HAVE_APITEST
#include <apitest.h>
#else
diff --git a/modules/rostests/apitests/crt/dll_startup.cpp
b/modules/rostests/apitests/crt/dll_startup.cpp
index c6487fd6ac4..506b6599d74 100644
--- a/modules/rostests/apitests/crt/dll_startup.cpp
+++ b/modules/rostests/apitests/crt/dll_startup.cpp
@@ -8,6 +8,11 @@
#include <apitest.h>
#include "dll_startup.h"
+// we test the initial value of m_uninit variable here, so this is required
+#ifdef __GNUC__
+#pragma GCC diagnostic ignored "-Wuninitialized"
+#endif
+
static struct counter_values counter_values =
{
0, 0, 0, 0, 5656, 0, 0
diff --git a/modules/rostests/apitests/crt/sprintf.c
b/modules/rostests/apitests/crt/sprintf.c
index 9a253e537f5..67945687797 100644
--- a/modules/rostests/apitests/crt/sprintf.c
+++ b/modules/rostests/apitests/crt/sprintf.c
@@ -16,10 +16,13 @@
#ifdef _MSC_VER
#pragma warning(disable:4778) // unterminated format string '%'
-#else
+#elif defined(__GNUC__)
#pragma GCC diagnostic ignored "-Wformat"
#pragma GCC diagnostic ignored "-Wformat-zero-length"
#pragma GCC diagnostic ignored "-Wnonnull"
+#if __GNUC__ >= 7
+#pragma GCC diagnostic ignored "-Wformat-overflow"
+#endif
#endif
static
diff --git a/modules/rostests/apitests/crt/static_construct.cpp
b/modules/rostests/apitests/crt/static_construct.cpp
index 3f8ff9ab25c..b26f2a1eabf 100644
--- a/modules/rostests/apitests/crt/static_construct.cpp
+++ b/modules/rostests/apitests/crt/static_construct.cpp
@@ -10,6 +10,10 @@
#include <strsafe.h>
#include "dll_startup.h"
+#ifdef __GNUC__
+#pragma GCC diagnostic ignored "-Wuninitialized"
+#endif
+
extern "C"
{
extern int static_init_counter;
@@ -221,7 +225,7 @@ START_TEST(static_construct)
ok(g_CreatedFileMapping == FALSE, "Expected the shared memory to be created
by my parent!\n");
return;
}
-
+
TestInitStatic();
TestDllStartup();
TestStaticDestruct();