From 5fb53b6b301c5ed03cdb3f800bb4af9395369a8f Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 30 Apr 2012 08:35:18 +0000 Subject: patch [#31091] PVS-Studio Analysis Fixes from Jason Wilkins (jwilkins) left out openjpeg changes since this library needs updating. --- intern/ghost/intern/GHOST_NDOFManager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'intern/ghost') diff --git a/intern/ghost/intern/GHOST_NDOFManager.cpp b/intern/ghost/intern/GHOST_NDOFManager.cpp index 694394afcde..e5f523ca8ef 100644 --- a/intern/ghost/intern/GHOST_NDOFManager.cpp +++ b/intern/ghost/intern/GHOST_NDOFManager.cpp @@ -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); -- cgit v1.2.3