[ATL] Suppress GCC8 warning in RelocateElements, fix build.

This commit is contained in:
Victor Perevertkin 2019-10-31 02:44:20 +03:00
parent 89ce773534
commit 2f15e2f743
No known key found for this signature in database
GPG key ID: C750B7222E9C7830
2 changed files with 11 additions and 5 deletions

View file

@ -6,11 +6,6 @@
* 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

View file

@ -99,7 +99,18 @@ public:
_In_reads_(NumElements) T* Source,
_In_ size_t NumElements)
{
// A simple memmove works for most of the types.
// You'll have to override this for types that have pointers to their
// own members.
#if defined(__GNUC__) && __GNUC__ >= 8
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wclass-memaccess"
#endif
memmove(Dest, Source, NumElements * sizeof(T));
#if defined(__GNUC__) && __GNUC__ >= 8
#pragma GCC diagnostic pop
#endif
}
};