diff options
author | bunnei <bunneidev@gmail.com> | 2022-02-11 05:52:13 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-11 05:52:13 +0100 |
commit | ca9da569ce8d5ce8106ff69afce484d9516570a8 (patch) | |
tree | db8f98fcfcd3d3d77f77c52b3be696c073f90f6e /src/core/hle/ipc_helpers.h | |
parent | Merge pull request #7861 from german77/user_features (diff) | |
parent | common: uuid: Use sizeof(u64) instead of 8 in Hash() (diff) | |
download | yuzu-ca9da569ce8d5ce8106ff69afce484d9516570a8.tar yuzu-ca9da569ce8d5ce8106ff69afce484d9516570a8.tar.gz yuzu-ca9da569ce8d5ce8106ff69afce484d9516570a8.tar.bz2 yuzu-ca9da569ce8d5ce8106ff69afce484d9516570a8.tar.lz yuzu-ca9da569ce8d5ce8106ff69afce484d9516570a8.tar.xz yuzu-ca9da569ce8d5ce8106ff69afce484d9516570a8.tar.zst yuzu-ca9da569ce8d5ce8106ff69afce484d9516570a8.zip |
Diffstat (limited to 'src/core/hle/ipc_helpers.h')
-rw-r--r-- | src/core/hle/ipc_helpers.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/core/hle/ipc_helpers.h b/src/core/hle/ipc_helpers.h index cf204f570..026257115 100644 --- a/src/core/hle/ipc_helpers.h +++ b/src/core/hle/ipc_helpers.h @@ -404,6 +404,11 @@ inline s32 RequestParser::Pop() { return static_cast<s32>(Pop<u32>()); } +// Ignore the -Wclass-memaccess warning on memcpy for non-trivially default constructible objects. +#if defined(__GNUC__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wclass-memaccess" +#endif template <typename T> void RequestParser::PopRaw(T& value) { static_assert(std::is_trivially_copyable_v<T>, @@ -411,6 +416,9 @@ 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__) +#pragma GCC diagnostic pop +#endif template <typename T> T RequestParser::PopRaw() { |