patch [#31091] PVS-Studio Analysis Fixes

from Jason Wilkins (jwilkins)

left out openjpeg changes since this library needs updating.
This commit is contained in:
Campbell Barton
2012-04-30 08:35:18 +00:00
parent 60c9addf79
commit 5fb53b6b30

View File

@@ -286,7 +286,7 @@ bool GHOST_NDOFManager::setDevice(unsigned short vendor_id, unsigned short produ
}
if (m_buttonMask == 0)
m_buttonMask = ~(-1 << m_buttonCount);
m_buttonMask = (int) ~(UINT_MAX << m_buttonCount);
#ifdef DEBUG_NDOF_BUTTONS
printf("ndof: %d buttons -> hex:%X\n", m_buttonCount, m_buttonMask);