diff --git a/src/common/gsvector_sse.h b/src/common/gsvector_sse.h index 2777f2a98..dc3234539 100644 --- a/src/common/gsvector_sse.h +++ b/src/common/gsvector_sse.h @@ -881,7 +881,7 @@ public: ALWAYS_INLINE bool rempty() const { return lt32(zwzw()).mask() != 0x00ff; } - ALWAYS_INLINE GSVector4i runion(const GSVector4i& v) const { return min_i32(v).upl64(max_i32(v).srl<8>()); } + ALWAYS_INLINE GSVector4i runion(const GSVector4i& v) const { return min_i32(v).blend32<0xc>(max_i32(v)); } ALWAYS_INLINE GSVector4i rintersect(const GSVector4i& v) const { return sat_i32(v); } ALWAYS_INLINE bool rintersects(const GSVector4i& v) const { return !rintersect(v).rempty(); } @@ -1354,7 +1354,8 @@ public: ALWAYS_INLINE static GSVector4i loadnt(const void* p) { - return GSVector4i(_mm_stream_load_si128(static_cast(p))); + // Should be const, but isn't... + return GSVector4i(_mm_stream_load_si128(const_cast<__m128i*>(static_cast(p)))); } ALWAYS_INLINE static GSVector4i load32(const void* p) { return GSVector4i(_mm_loadu_si32(p)); } diff --git a/src/duckstation-qt/debuggerwindow.cpp b/src/duckstation-qt/debuggerwindow.cpp index e8c191edd..f0b8e1bc0 100644 --- a/src/duckstation-qt/debuggerwindow.cpp +++ b/src/duckstation-qt/debuggerwindow.cpp @@ -594,7 +594,7 @@ void DebuggerWindow::setMemoryViewRegion(Bus::MemoryRegion region) void* const mem_ptr = Bus::GetMemoryRegionPointer(region); const bool mem_writable = Bus::IsMemoryRegionWritable(region); const MemoryViewWidget::EditCallback edit_callback = - ((region == Bus::MemoryRegion::RAM) ? edit_ram_callback : nullptr); + ((region == Bus::MemoryRegion::RAM) ? static_cast(edit_ram_callback) : nullptr); m_ui.memoryView->setData(start, mem_ptr, end - start, mem_writable, edit_callback); #define SET_REGION_RADIO_BUTTON(name, rb_region) \ diff --git a/src/util/imgui_fullscreen.cpp b/src/util/imgui_fullscreen.cpp index 976ea001a..81fa4068c 100644 --- a/src/util/imgui_fullscreen.cpp +++ b/src/util/imgui_fullscreen.cpp @@ -917,6 +917,8 @@ void ImGuiFullscreen::BeginMenuButtons(u32 num_items, float y_align, float x_pad case ImGuiDir_Down: ImGui::SetScrollY(std::min(ImGui::GetScrollY() + item_height, ImGui::GetScrollMaxY())); break; + default: + break; } } diff --git a/src/util/vulkan_loader.h b/src/util/vulkan_loader.h index cf7d267bc..692d40ccf 100644 --- a/src/util/vulkan_loader.h +++ b/src/util/vulkan_loader.h @@ -73,12 +73,16 @@ class Error; #include "vulkan_entry_points.h" // We include vk_mem_alloc globally, so we don't accidentally include it before the vulkan header somewhere. -#ifdef __clang__ +#if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wnullability-completeness" #pragma clang diagnostic ignored "-Wunused-variable" #pragma clang diagnostic ignored "-Wmissing-field-initializers" #pragma clang diagnostic ignored "-Wunused-function" +#elif defined(__GNUC__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-variable" +#pragma GCC diagnostic ignored "-Wunused-function" #elif defined(_MSC_VER) #pragma warning(push, 0) #endif @@ -88,8 +92,10 @@ class Error; #define VMA_STATS_STRING_ENABLED 0 #include "vulkan/vk_mem_alloc.h" -#ifdef __clang__ +#if defined(__clang__) #pragma clang diagnostic pop +#elif defined(__GNUC__) +#pragma GCC diagnostic pop #elif defined(_MSC_VER) #pragma warning(pop) #endif