diff options
author | Erik Verbruggen <erik.verbruggen@digia.com> | 2014-03-05 18:03:31 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-03-07 12:20:24 +0100 |
commit | 0d3d8aa924f07da2364c73bfb1b4c95cd3429d10 (patch) | |
tree | e6e1cfe92f1fddda96cc8f33c4e487cb0d3491e4 /src/3rdparty | |
parent | 289d93f785dc3006dd77c33e121c110c5176ac6d (diff) |
Fix MSVC2012 compiler warnings in disabled code.
... that should soon get enabled.
Change-Id: I2f8393cab5e99a7f5d3c7df6af6385fefd2d4dd1
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/3rdparty')
-rw-r--r-- | src/3rdparty/masm/assembler/LinkBuffer.cpp | 3 | ||||
-rw-r--r-- | src/3rdparty/masm/yarr/YarrJIT.cpp | 9 |
2 files changed, 9 insertions, 3 deletions
diff --git a/src/3rdparty/masm/assembler/LinkBuffer.cpp b/src/3rdparty/masm/assembler/LinkBuffer.cpp index 645eba5380..bf4f2f5278 100644 --- a/src/3rdparty/masm/assembler/LinkBuffer.cpp +++ b/src/3rdparty/masm/assembler/LinkBuffer.cpp @@ -154,7 +154,8 @@ void LinkBuffer::performFinalization() #if ENABLE(BRANCH_COMPACTION) ExecutableAllocator::makeExecutable(code(), m_initialSize); #else - ExecutableAllocator::makeExecutable(code(), m_size); + ASSERT(m_size <= INT_MAX); + ExecutableAllocator::makeExecutable(code(), static_cast<int>(m_size)); #endif MacroAssembler::cacheFlush(code(), m_size); } diff --git a/src/3rdparty/masm/yarr/YarrJIT.cpp b/src/3rdparty/masm/yarr/YarrJIT.cpp index 8027446118..783a869b5a 100644 --- a/src/3rdparty/masm/yarr/YarrJIT.cpp +++ b/src/3rdparty/masm/yarr/YarrJIT.cpp @@ -212,7 +212,11 @@ class YarrGenerator : private MacroAssembler { if (charClass->m_ranges.size()) { unsigned matchIndex = 0; JumpList failures; - matchCharacterClassRange(character, failures, matchDest, &charClass->m_ranges[0], charClass->m_ranges.size(), &matchIndex, charClass->m_matches.isEmpty() ? 0 : &charClass->m_matches[0], charClass->m_matches.size()); + ASSERT(charClass->m_ranges.size() <= UINT_MAX); + matchCharacterClassRange(character, failures, matchDest, &charClass->m_ranges[0], + static_cast<unsigned>(charClass->m_ranges.size()), + &matchIndex, charClass->m_matches.isEmpty() ? 0 : &charClass->m_matches[0], + static_cast<unsigned>(charClass->m_matches.size())); while (matchIndex < charClass->m_matches.size()) matchDest.append(branch32(Equal, character, Imm32((unsigned short)charClass->m_matches[matchIndex++]))); @@ -234,7 +238,8 @@ class YarrGenerator : private MacroAssembler { matchDest.append(branch32(Equal, character, Imm32((unsigned short)ch))); } - if (unsigned countAZaz = matchesAZaz.size()) { + ASSERT(matchesAZaz.size() <= UINT_MAX); + if (unsigned countAZaz = static_cast<int>(matchesAZaz.size())) { or32(TrustedImm32(32), character); for (unsigned i = 0; i < countAZaz; ++i) matchDest.append(branch32(Equal, character, TrustedImm32(matchesAZaz[i]))); |