diff --git a/core/os/memory.h b/core/os/memory.h index 9753d3c6481..7efa85e7f47 100644 --- a/core/os/memory.h +++ b/core/os/memory.h @@ -200,6 +200,8 @@ template _FORCE_INLINE_ void memnew_arr_placement(T *p_start, size_t p_num) { if constexpr (std::is_trivially_constructible_v && !p_ensure_zero) { // Don't need to do anything :) + (void)p_start; + (void)p_num; } else if constexpr (is_zero_constructible_v) { // Can optimize with memset. memset(static_cast(p_start), 0, p_num * sizeof(T));