Cleared -Wstrict-overflow warning on Cygwin with C++11

pull/98/head
Jeffrey Walton 2015-12-31 14:51:19 -05:00
parent 5a60f4c35d
commit 42e9494ae7
1 changed files with 1 additions and 1 deletions

View File

@ -58,7 +58,7 @@ size_t BaseN_Encoder::Put2(const byte *begin, size_t length, int messageEnd, boo
while (true) while (true)
{ {
assert(m_bitPos < m_bitsPerChar); assert(m_bitPos < m_bitsPerChar);
unsigned int bitsLeftInTarget = m_bitsPerChar-m_bitPos; unsigned int bitsLeftInTarget = (unsigned int)(m_bitsPerChar-m_bitPos);
m_outBuf[m_bytePos] |= b >> (8-bitsLeftInTarget); m_outBuf[m_bytePos] |= b >> (8-bitsLeftInTarget);
if (bitsLeftInSource >= bitsLeftInTarget) if (bitsLeftInSource >= bitsLeftInTarget)
{ {