summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/os/memory.cpp5
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;