mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-26 16:52:46 +01:00
ipc_helpers: Ignore GCC compiler warnings only on GCC
Clang and ICC for whatever reason also defines __GNUC__. Exclude them from this check.
This commit is contained in:
parent
b02c3f2314
commit
347432524c
1 changed files with 2 additions and 2 deletions
|
@ -406,7 +406,7 @@ inline s32 RequestParser::Pop() {
|
|||
}
|
||||
|
||||
// Ignore the -Wclass-memaccess warning on memcpy for non-trivially default constructible objects.
|
||||
#if defined(__GNUC__)
|
||||
#if defined(__GNUC__) && !defined(__clang__) && !defined(__INTEL_COMPILER)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wclass-memaccess"
|
||||
#endif
|
||||
|
@ -417,7 +417,7 @@ void RequestParser::PopRaw(T& value) {
|
|||
std::memcpy(&value, cmdbuf + index, sizeof(T));
|
||||
index += (sizeof(T) + 3) / 4; // round up to word length
|
||||
}
|
||||
#if defined(__GNUC__)
|
||||
#if defined(__GNUC__) && !defined(__clang__) && !defined(__INTEL_COMPILER)
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in a new issue