diff --git a/examples/X11/X11.cpp b/examples/X11/X11.cpp index 5b623d93..b8263a05 100644 --- a/examples/X11/X11.cpp +++ b/examples/X11/X11.cpp @@ -201,7 +201,7 @@ int main() while (running) { - while (event = xcb_poll_for_event(xcbConnection)) + while ((event = xcb_poll_for_event(xcbConnection))) { running = false; } diff --git a/src/SFML/Window/Unix/InputImpl.cpp b/src/SFML/Window/Unix/InputImpl.cpp index d6aa5fb4..a41fa46b 100644 --- a/src/SFML/Window/Unix/InputImpl.cpp +++ b/src/SFML/Window/Unix/InputImpl.cpp @@ -179,7 +179,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/Unix/VideoModeImpl.cpp b/src/SFML/Window/Unix/VideoModeImpl.cpp index 01ddf036..48637980 100644 --- a/src/SFML/Window/Unix/VideoModeImpl.cpp +++ b/src/SFML/Window/Unix/VideoModeImpl.cpp @@ -139,7 +139,6 @@ VideoMode VideoModeImpl::getDesktopMode() if (! errors) { // Get the current video mode - xcb_randr_rotation_t Rotation = (xcb_randr_rotation_t)config->rotation; xcb_randr_mode_t currentMode = config->sizeID; // Get the available screen sizes diff --git a/src/SFML/Window/Unix/WindowImplX11.cpp b/src/SFML/Window/Unix/WindowImplX11.cpp index 778898eb..066093d1 100644 --- a/src/SFML/Window/Unix/WindowImplX11.cpp +++ b/src/SFML/Window/Unix/WindowImplX11.cpp @@ -67,13 +67,6 @@ namespace PointerMotionMask | KeyPressMask | KeyReleaseMask | StructureNotifyMask | EnterWindowMask | LeaveWindowMask; - // Filter the events received by windows (only allow those matching a specific window) - Bool checkEvent(::Display*, XEvent* event, XPointer userData) - { - // Just check if the event matches the window - return event->xany.window == reinterpret_cast< ::Window >(userData); - } - // Find the name of the current executable void findExecutableName(char* buffer, std::size_t bufferSize) { @@ -127,7 +120,7 @@ m_useSizeHints(false) if (m_window) { // Make sure the window is listening to all the required events - const uint32_t value_list[] = {eventMask}; + const uint32_t value_list[] = {static_cast(eventMask)}; xcb_change_window_attributes(m_connection, m_window, @@ -141,7 +134,7 @@ m_useSizeHints(false) //////////////////////////////////////////////////////////// -WindowImplX11::WindowImplX11(VideoMode mode, const String& title, unsigned long style, const ContextSettings& settings) : +WindowImplX11::WindowImplX11(VideoMode mode, const String& title, unsigned long style, const ContextSettings& /*settings*/) : m_window (0), m_inputMethod (NULL), m_inputContext(NULL), @@ -184,11 +177,8 @@ m_useSizeHints(false) if (fullscreen) switchToFullscreen(mode); - // Choose the visual according to the context settings - XVisualInfo visualInfo = ContextType::selectBestVisual(m_display, mode.bitsPerPixel, settings); - // Define the window attributes - const uint32_t value_list[] = {fullscreen, eventMask}; + const uint32_t value_list[] = {fullscreen, static_cast(eventMask)}; // Create the window m_window = xcb_generate_id(m_connection); @@ -378,7 +368,7 @@ void WindowImplX11::processEvents() xcb_key_release_event_t* lastKeyReleaseEvent = NULL; uint8_t eventType = 0; - while(event = xcb_poll_for_event(m_connection)) + while((event = xcb_poll_for_event(m_connection))) { eventType = event->response_type & ~0x80; @@ -459,7 +449,7 @@ Vector2i WindowImplX11::getPosition() const //////////////////////////////////////////////////////////// void WindowImplX11::setPosition(const Vector2i& position) { - uint32_t values[] = {position.x, position.y}; + uint32_t values[] = {static_cast(position.x), static_cast(position.y)}; xcb_configure_window(m_connection, m_window, XCB_CONFIG_WINDOW_X | XCB_CONFIG_WINDOW_Y, values);