From 7d6b36bf73c32b830a1b9022122a75d89f7686e0 Mon Sep 17 00:00:00 2001 From: Ryan Houdek Date: Fri, 5 Jul 2013 19:56:15 -0500 Subject: [PATCH] Fix most ARM warnings --- Source/Core/AudioCommon/Src/OpenSLESStream.cpp | 3 ++- Source/Core/Common/Src/ArmEmitter.cpp | 2 +- Source/Core/Core/Src/GeckoCode.cpp | 2 +- Source/Core/Core/Src/HW/Memmap.cpp | 10 +++++----- Source/Core/VideoCommon/Src/DriverDetails.cpp | 4 ++-- Source/Core/VideoCommon/Src/DriverDetails.h | 2 +- 6 files changed, 12 insertions(+), 11 deletions(-) diff --git a/Source/Core/AudioCommon/Src/OpenSLESStream.cpp b/Source/Core/AudioCommon/Src/OpenSLESStream.cpp index 0035b4adeb..26391d5d72 100644 --- a/Source/Core/AudioCommon/Src/OpenSLESStream.cpp +++ b/Source/Core/AudioCommon/Src/OpenSLESStream.cpp @@ -41,7 +41,8 @@ static void bqPlayerCallback(SLAndroidSimpleBufferQueueItf bq, void *context) { // Comment from sample code: // the most likely other result is SL_RESULT_BUFFER_INSUFFICIENT, // which for this code example would indicate a programming error - assert(SL_RESULT_SUCCESS == result); + _assert_msg_(AUDIO, SL_RESULT_SUCCESS == result, "Couldn't enqueue audio stream."); + curBuffer ^= 1; // Switch buffer // Render to the fresh buffer diff --git a/Source/Core/Common/Src/ArmEmitter.cpp b/Source/Core/Common/Src/ArmEmitter.cpp index a8d0fcc92a..eff366312c 100644 --- a/Source/Core/Common/Src/ArmEmitter.cpp +++ b/Source/Core/Common/Src/ArmEmitter.cpp @@ -86,7 +86,7 @@ bool TryMakeOperand2_AllowNegation(s32 imm, Operand2 &op2, bool *negated) Operand2 AssumeMakeOperand2(u32 imm) { Operand2 op2; bool result = TryMakeOperand2(imm, op2); - _dbg_assert_msg_(JIT, result, "Could not make assumed Operand2."); + _assert_msg_(DYNA_REC, result, "Could not make assumed Operand2."); return op2; } diff --git a/Source/Core/Core/Src/GeckoCode.cpp b/Source/Core/Core/Src/GeckoCode.cpp index c7127ef018..252e758746 100644 --- a/Source/Core/Core/Src/GeckoCode.cpp +++ b/Source/Core/Core/Src/GeckoCode.cpp @@ -83,7 +83,7 @@ bool GeckoCode::Compare(GeckoCode compare) const if (codes.size() != compare.codes.size()) return false; - int exist = 0; + unsigned int exist = 0; std::vector::const_iterator codes_iter = codes.begin(), codes_end = codes.end(); diff --git a/Source/Core/Core/Src/HW/Memmap.cpp b/Source/Core/Core/Src/HW/Memmap.cpp index 170b67de5b..96f2945391 100644 --- a/Source/Core/Core/Src/HW/Memmap.cpp +++ b/Source/Core/Core/Src/HW/Memmap.cpp @@ -113,18 +113,18 @@ void HW_Default_Write(const T _Data, const u32 _Address){ ERROR_LOG(MASTER_LOG, template void HW_Default_Read(T _Data, const u32 _Address){ ERROR_LOG(MASTER_LOG, "Illegal HW Read%lu %08x", (unsigned long)sizeof(T)*8, _Address); _dbg_assert_(MEMMAP, 0);} -#define PAGE_SHIFT 10 -#define PAGE_SIZE (1 << PAGE_SHIFT) -#define PAGE_MASK (PAGE_SHIFT - 1) +#define HW_PAGE_SHIFT 10 +#define HW_PAGE_SIZE (1 << HW_PAGE_SHIFT) +#define HW_PAGE_MASK (HW_PAGE_SHIFT - 1) template void HW_Read_Memory(T &_Data, const u32 _Address) { - _Data = *(T *)&P[_Address & PAGE_MASK]; + _Data = *(T *)&P[_Address & HW_PAGE_MASK]; } template void HW_Write_Memory(T _Data, const u32 _Address) { - *(T *)&P[_Address & PAGE_MASK] = _Data; + *(T *)&P[_Address & HW_PAGE_MASK] = _Data; } // Create shortcuts to the hardware devices' read and write functions. diff --git a/Source/Core/VideoCommon/Src/DriverDetails.cpp b/Source/Core/VideoCommon/Src/DriverDetails.cpp index 41f22be55c..0a6510eb90 100644 --- a/Source/Core/VideoCommon/Src/DriverDetails.cpp +++ b/Source/Core/VideoCommon/Src/DriverDetails.cpp @@ -40,7 +40,7 @@ namespace DriverDetails switch(m_vendor) { case VENDOR_QUALCOMM: - for (int a = 0; a < (sizeof(m_qualcommbugs) / sizeof(BugInfo)); ++a) + for (unsigned int a = 0; a < (sizeof(m_qualcommbugs) / sizeof(BugInfo)); ++a) m_bugs[std::make_pair(m_vendor, m_qualcommbugs[a].m_bug)] = m_qualcommbugs[a]; break; default: @@ -61,7 +61,7 @@ namespace DriverDetails it->second.m_hasbug = true; } - const bool HasBug(Bug bug) + bool HasBug(Bug bug) { auto it = m_bugs.find(std::make_pair(m_vendor, bug)); if (it == m_bugs.end()) diff --git a/Source/Core/VideoCommon/Src/DriverDetails.h b/Source/Core/VideoCommon/Src/DriverDetails.h index bf831e29b9..f2f3480f70 100644 --- a/Source/Core/VideoCommon/Src/DriverDetails.h +++ b/Source/Core/VideoCommon/Src/DriverDetails.h @@ -68,5 +68,5 @@ namespace DriverDetails void Init(Vendor vendor, const u32 devfamily, const double version); // Once Vendor and driver version is set, this will return if it has the applicable bug passed to it. - const bool HasBug(Bug bug); + bool HasBug(Bug bug); }