summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/image.cpp6
-rw-r--r--core/os/memory.cpp7
-rw-r--r--core/rid.h1
3 files changed, 4 insertions, 10 deletions
diff --git a/core/image.cpp b/core/image.cpp
index e90ed96499..e2b56c51dc 100644
--- a/core/image.cpp
+++ b/core/image.cpp
@@ -780,9 +780,9 @@ void Image::resize(int p_width, int p_height, Interpolation p_interpolation) {
// Setup mipmap-aware scaling
Image dst2;
- int mip1;
- int mip2;
- float mip1_weight;
+ int mip1 = 0;
+ int mip2 = 0;
+ float mip1_weight = 0;
if (mipmap_aware) {
float avg_scale = ((float)p_width / width + (float)p_height / height) * 0.5f;
if (avg_scale >= 1.0f) {
diff --git a/core/os/memory.cpp b/core/os/memory.cpp
index be48c927b6..f25e40ef78 100644
--- a/core/os/memory.cpp
+++ b/core/os/memory.cpp
@@ -89,13 +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'.
-#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;
@@ -177,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
diff --git a/core/rid.h b/core/rid.h
index fbb3e443fc..81d5b45d21 100644
--- a/core/rid.h
+++ b/core/rid.h
@@ -118,7 +118,6 @@ protected:
p_rid._data->_owner = NULL;
}
-#
#endif
public: