diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2018-10-04 12:04:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-04 12:04:54 +0200 |
commit | f92a29adfea7fb37a306da2202738ebfa1fb79b2 (patch) | |
tree | 4883385e9ea2f977c38909b98cf385e82b3fe29b /core/os/memory.cpp | |
parent | cfa373c69f6af64d9fce8f1773a4b795f361a34c (diff) | |
parent | 97b9697ea2601f0fd92e3f326c6db29e0598638f (diff) | |
download | redot-engine-f92a29adfea7fb37a306da2202738ebfa1fb79b2.tar.gz |
Merge pull request #22710 from akien-mga/fix-warnings
Fix some OSX and iOS Clang warnings
Diffstat (limited to 'core/os/memory.cpp')
-rw-r--r-- | core/os/memory.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/core/os/memory.cpp b/core/os/memory.cpp index 041371a6e2..be48c927b6 100644 --- a/core/os/memory.cpp +++ b/core/os/memory.cpp @@ -89,8 +89,13 @@ void *Memory::alloc_static(size_t p_bytes, bool p_pad_align) { atomic_increment(&alloc_count); if (prepad) { + // Clang 5 wrongly complains about 's' being unused, + // while it's used to modify 'mem'. +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wunused-variable" uint64_t *s = (uint64_t *)mem; *s = p_bytes; +#pragma clang diagnostic pop uint8_t *s8 = (uint8_t *)mem; |