diff options
Diffstat (limited to 'core')
| -rw-r--r-- | core/os/input.cpp | 2 | ||||
| -rw-r--r-- | core/os/memory.cpp | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/core/os/input.cpp b/core/os/input.cpp index 6830df7e81..4cd1f0b24a 100644 --- a/core/os/input.cpp +++ b/core/os/input.cpp @@ -42,7 +42,7 @@ Input *Input::get_singleton() { } void Input::set_mouse_mode(MouseMode p_mode) { - ERR_FAIL_INDEX(p_mode, 4); + ERR_FAIL_INDEX((int)p_mode, 4); OS::get_singleton()->set_mouse_mode((OS::MouseMode)p_mode); } 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; |