mirror of
https://github.com/reactos/reactos.git
synced 2025-06-26 10:59:42 +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)
|
* 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
|
#ifdef HAVE_APITEST
|
||||||
#include <apitest.h>
|
#include <apitest.h>
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -99,7 +99,18 @@ public:
|
||||||
_In_reads_(NumElements) T* Source,
|
_In_reads_(NumElements) T* Source,
|
||||||
_In_ size_t NumElements)
|
_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));
|
memmove(Dest, Source, NumElements * sizeof(T));
|
||||||
|
#if defined(__GNUC__) && __GNUC__ >= 8
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue