diff --git a/include/SFML/System/Utf.inl b/include/SFML/System/Utf.inl index 091b7a13bd..3f0c81f327 100644 --- a/include/SFML/System/Utf.inl +++ b/include/SFML/System/Utf.inl @@ -675,7 +675,7 @@ Uint32 Utf<32>::decodeWide(In input) // In both cases, a simple copy is enough (UCS-2 is a subset of UCS-4, // and UCS-4 *is* UTF-32). - return input; + return static_cast(input); } diff --git a/src/SFML/System/Err.cpp b/src/SFML/System/Err.cpp index 377da23e09..4dc2f50943 100644 --- a/src/SFML/System/Err.cpp +++ b/src/SFML/System/Err.cpp @@ -83,7 +83,7 @@ class DefaultErrStreamBuf : public std::streambuf if (pbase() != pptr()) { // Print the contents of the write buffer into the standard error output - std::size_t size = static_cast(pptr() - pbase()); + std::size_t size = static_cast(pptr() - pbase()); fwrite(pbase(), 1, size, stderr); // Reset the pointer position to the beginning of the write buffer diff --git a/src/SFML/Window/Win32/CursorImpl.cpp b/src/SFML/Window/Win32/CursorImpl.cpp index 3e173a7dae..a9cc8869e0 100755 --- a/src/SFML/Window/Win32/CursorImpl.cpp +++ b/src/SFML/Window/Win32/CursorImpl.cpp @@ -140,7 +140,7 @@ bool CursorImpl::loadFromSystem(Cursor::Type type) { release(); - LPCTSTR shape; + LPCTSTR shape = NULL; switch (type) { case Cursor::Arrow: shape = IDC_ARROW; break; diff --git a/src/SFML/Window/Win32/InputImpl.cpp b/src/SFML/Window/Win32/InputImpl.cpp index 6314fe61f3..dc37cf9f0c 100644 --- a/src/SFML/Window/Win32/InputImpl.cpp +++ b/src/SFML/Window/Win32/InputImpl.cpp @@ -157,7 +157,7 @@ bool InputImpl::isKeyPressed(Keyboard::Key key) //////////////////////////////////////////////////////////// -void InputImpl::setVirtualKeyboardVisible(bool visible) +void InputImpl::setVirtualKeyboardVisible(bool /*visible*/) { // Not applicable } diff --git a/src/SFML/Window/Win32/JoystickImpl.cpp b/src/SFML/Window/Win32/JoystickImpl.cpp index 3719926162..84985d496f 100644 --- a/src/SFML/Window/Win32/JoystickImpl.cpp +++ b/src/SFML/Window/Win32/JoystickImpl.cpp @@ -523,12 +523,12 @@ bool JoystickImpl::openDInput(unsigned int index) m_buffered = false; // Search for a joystick with the given index in the connected list - for (std::vector::iterator i = joystickList.begin(); i != joystickList.end(); ++i) + for (std::vector::iterator it = joystickList.begin(); it != joystickList.end(); ++it) { - if (i->index == index) + if (it->index == index) { // Create device - HRESULT result = directInput->CreateDevice(i->guid, &m_device, NULL); + HRESULT result = directInput->CreateDevice(it->guid, &m_device, NULL); if (FAILED(result)) { @@ -905,7 +905,7 @@ JoystickState JoystickImpl::updateDInputBuffered() // Get the current state of each axis for (int j = 0; j < Joystick::AxisCount; ++j) { - if (m_axes[j] == events[i].dwOfs) + if (m_axes[j] == static_cast(events[i].dwOfs)) { if ((j == Joystick::PovX) || (j == Joystick::PovY)) { @@ -941,7 +941,7 @@ JoystickState JoystickImpl::updateDInputBuffered() // Get the current state of each button for (int j = 0; j < Joystick::ButtonCount; ++j) { - if (m_buttons[j] == events[i].dwOfs) + if (m_buttons[j] == static_cast(events[i].dwOfs)) m_state.buttons[j] = (events[i].dwData != 0); } }