diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2018-10-04 16:21:08 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-04 16:21:08 +0200 |
commit | 3ca2afc09c7a945b8491d8a085203142b2562833 (patch) | |
tree | dcdaf258a88f28095009a2632359666f5dc0e1f7 /core | |
parent | 181af9b48431a5697056c561c9e2edafc7d738f0 (diff) | |
parent | 6bb5ee0ded2cf3914960c17fabf046d43bfb97dd (diff) |
Merge pull request #22719 from akien-mga/ci-werror
Travis: Enable 'werror' for X11 and Android builds
Diffstat (limited to 'core')
-rw-r--r-- | core/os/memory.cpp | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/core/os/memory.cpp b/core/os/memory.cpp index d212efe3cf..f25e40ef78 100644 --- a/core/os/memory.cpp +++ b/core/os/memory.cpp @@ -89,17 +89,8 @@ 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'. -#ifdef __clang__ -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wunused-variable" -#endif // __clang__ uint64_t *s = (uint64_t *)mem; *s = p_bytes; -#ifdef __clang__ -#pragma clang diagnostic pop -#endif // __clang__ uint8_t *s8 = (uint8_t *)mem; @@ -181,9 +172,9 @@ void Memory::free_static(void *p_ptr, bool p_pad_align) { if (prepad) { mem -= PAD_ALIGN; - uint64_t *s = (uint64_t *)mem; #ifdef DEBUG_ENABLED + uint64_t *s = (uint64_t *)mem; atomic_sub(&mem_usage, *s); #endif |