[APITESTS] Ignore GCC8 warnings where we test some crazy stuff
authorVictor Perevertkin <victor@perevertkin.ru>
Sat, 17 Aug 2019 20:05:45 +0000 (23:05 +0300)
committerVictor Perevertkin <victor@perevertkin.ru>
Tue, 20 Aug 2019 13:05:47 +0000 (15:05 +0200)
modules/rostests/apitests/atl/CAtlArray.cpp
modules/rostests/apitests/crt/dll_startup.cpp
modules/rostests/apitests/crt/sprintf.c
modules/rostests/apitests/crt/static_construct.cpp

index 8d4bc70..ef7828e 100644 (file)
@@ -6,6 +6,11 @@
  *              Copyright 2019 Mark Jansen (mark.jansen@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
index c6487fd..506b659 100644 (file)
@@ -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
index 9a253e5..6794568 100644 (file)
 
 #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
index 3f8ff9a..b26f2a1 100644 (file)
 #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();