From c89ae53677b99706d5f160fea73a19e2236f944f Mon Sep 17 00:00:00 2001 From: Shawn Hoffman Date: Sat, 17 Jul 2021 18:24:36 -0700 Subject: [PATCH] msvc: remove warning disables which no longer fire --- Source/Core/Common/Crypto/ec.cpp | 8 -------- Source/Core/Common/SDCardUtil.cpp | 9 --------- Source/Core/Core/HW/WiimoteCommon/WiimoteReport.h | 13 ++----------- Source/Core/Core/HW/WiimoteEmu/EmuSubroutines.cpp | 2 +- 4 files changed, 3 insertions(+), 29 deletions(-) diff --git a/Source/Core/Common/Crypto/ec.cpp b/Source/Core/Common/Crypto/ec.cpp index 08a2aa00ea..6f2aa0b977 100644 --- a/Source/Core/Common/Crypto/ec.cpp +++ b/Source/Core/Common/Crypto/ec.cpp @@ -11,11 +11,6 @@ #include "Common/Random.h" #include "Common/StringUtil.h" -#ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable : 4505) -#endif - namespace Common::ec { static const u8 square[16] = {0x00, 0x01, 0x04, 0x05, 0x10, 0x11, 0x14, 0x15, @@ -298,7 +293,4 @@ std::array ComputeSharedSecret(const u8* private_key, const u8* public_k std::copy_n(data.Data(), shared_secret.size(), shared_secret.begin()); return shared_secret; } -#ifdef _MSC_VER -#pragma warning(pop) -#endif } // namespace Common::ec diff --git a/Source/Core/Common/SDCardUtil.cpp b/Source/Core/Common/SDCardUtil.cpp index c3a8eec6d8..1a59913458 100644 --- a/Source/Core/Common/SDCardUtil.cpp +++ b/Source/Core/Common/SDCardUtil.cpp @@ -49,11 +49,6 @@ #include // for unlink() #endif -#ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable : 4310) -#endif - namespace Common { // Believe me, you *don't* want to change these constants !! @@ -288,7 +283,3 @@ FailWrite: return false; } } // namespace Common - -#ifdef _MSC_VER -#pragma warning(pop) -#endif diff --git a/Source/Core/Core/HW/WiimoteCommon/WiimoteReport.h b/Source/Core/Core/HW/WiimoteCommon/WiimoteReport.h index e28ac217c7..742f877fa2 100644 --- a/Source/Core/Core/HW/WiimoteCommon/WiimoteReport.h +++ b/Source/Core/Core/HW/WiimoteCommon/WiimoteReport.h @@ -10,12 +10,6 @@ #include "Core/HW/WiimoteCommon/WiimoteConstants.h" #include "InputCommon/ControllerEmu/ControllerEmu.h" -#ifdef _MSC_VER -#pragma warning(push) -// Disable warning for zero-sized array: -#pragma warning(disable : 4200) -#endif - namespace WiimoteCommon { #pragma pack(push, 1) @@ -27,7 +21,8 @@ struct OutputReportGeneric union { - u8 data[0]; + // Actual size varies + u8 data[1]; struct { // Enable/disable rumble. (Valid for ALL output reports) @@ -309,7 +304,3 @@ struct AccelCalibrationData } // namespace WiimoteCommon #pragma pack(pop) - -#ifdef _MSC_VER -#pragma warning(pop) -#endif diff --git a/Source/Core/Core/HW/WiimoteEmu/EmuSubroutines.cpp b/Source/Core/Core/HW/WiimoteEmu/EmuSubroutines.cpp index a8b685e29f..f74b7722a9 100644 --- a/Source/Core/Core/HW/WiimoteEmu/EmuSubroutines.cpp +++ b/Source/Core/Core/HW/WiimoteEmu/EmuSubroutines.cpp @@ -53,7 +53,7 @@ void Wiimote::InvokeHandler(H&& handler, const WiimoteCommon::OutputReportGeneri return; } - (this->*handler)(Common::BitCastPtr(rpt.data)); + (this->*handler)(Common::BitCastPtr(&rpt.data[0])); } void Wiimote::EventLinked()