diff --git a/common/TextureDecompress.h b/common/TextureDecompress.h index 58193d2e08..f19719a194 100644 --- a/common/TextureDecompress.h +++ b/common/TextureDecompress.h @@ -59,10 +59,7 @@ public: }; }; - inline color_rgba() - { - static_assert(sizeof(*this) == 4, "sizeof(*this) != 4"); - } + inline color_rgba() = default; inline color_rgba(int y) { @@ -190,6 +187,8 @@ public: static color_rgba comp_max(const color_rgba& a, const color_rgba& b) { return color_rgba(std::max(a[0], b[0]), std::max(a[1], b[1]), std::max(a[2], b[2]), std::max(a[3], b[3])); } }; +static_assert(sizeof(color_rgba) == 4); + bool unpack_bc7(const void *pBlock, color_rgba *pPixels); } // namespace bc7decomp diff --git a/pcsx2-qt/Debugger/Models/SavedAddressesModel.cpp b/pcsx2-qt/Debugger/Models/SavedAddressesModel.cpp index db8534fa3a..ea4ba96ac6 100644 --- a/pcsx2-qt/Debugger/Models/SavedAddressesModel.cpp +++ b/pcsx2-qt/Debugger/Models/SavedAddressesModel.cpp @@ -133,7 +133,7 @@ void SavedAddressesModel::addRow(SavedAddress addresstoSave) bool SavedAddressesModel::removeRows(int row, int count, const QModelIndex& parent) { - if (row + count > m_savedAddresses.size() || row < 0 || count < 1) + if (row < 0 || count < 1 || static_cast(row + count) > m_savedAddresses.size()) return false; beginRemoveRows(parent, row, row + count - 1); m_savedAddresses.erase(m_savedAddresses.begin() + row, m_savedAddresses.begin() + row + count); diff --git a/pcsx2-qt/QtHost.cpp b/pcsx2-qt/QtHost.cpp index 5341f093ea..93222e7856 100644 --- a/pcsx2-qt/QtHost.cpp +++ b/pcsx2-qt/QtHost.cpp @@ -1407,7 +1407,7 @@ std::optional QtHost::DownloadFile(QWidget* parent, const QString& title, progress.SetCancellable(true); http->CreateRequest( - std::move(url), [parent, data, &download_result, &progress](s32 status_code, const std::string&, std::vector hdata) { + std::move(url), [parent, data, &download_result](s32 status_code, const std::string&, std::vector hdata) { if (status_code == HTTPDownloader::HTTP_STATUS_CANCELLED) return; diff --git a/pcsx2/x86/iFPU.cpp b/pcsx2/x86/iFPU.cpp index f4bf4de5e4..463c32277f 100644 --- a/pcsx2/x86/iFPU.cpp +++ b/pcsx2/x86/iFPU.cpp @@ -1093,12 +1093,11 @@ void recDIVhelper2(int regd, int regt) // Doesn't sets flags ClampValues(regd); } -alignas(16) static FPControlRegister roundmode_nearest, roundmode_neg; +alignas(16) static FPControlRegister roundmode_nearest; void recDIV_S_xmm(int info) { EE::Profiler.EmitOp(eeOpcode::DIV_F); - bool roundmodeFlag = false; int t0reg = _allocTempXMMreg(XMMT_FPS); //Console.WriteLn("DIV"); diff --git a/pcsx2/x86/iFPUd.cpp b/pcsx2/x86/iFPUd.cpp index 84f8d41b5a..1ed9c6ca8a 100644 --- a/pcsx2/x86/iFPUd.cpp +++ b/pcsx2/x86/iFPUd.cpp @@ -652,7 +652,7 @@ void recDIVhelper2(int regd, int regt) // Doesn't sets flags ToPS2FPU(regd, false, regt, false); } -alignas(16) static FPControlRegister roundmode_nearest, roundmode_neg; +alignas(16) static FPControlRegister roundmode_nearest; void recDIV_S_xmm(int info) {