mirror of
https://github.com/reactos/reactos.git
synced 2025-05-04 05:03:22 +00:00
[ATL] Suppress GCC8 warning in RelocateElements, fix build.
This commit is contained in:
parent
89ce773534
commit
2f15e2f743
2 changed files with 11 additions and 5 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue