diff --git a/src/egl_context.c b/src/egl_context.c index bab955ff..b5e0b631 100644 --- a/src/egl_context.c +++ b/src/egl_context.c @@ -243,7 +243,7 @@ void _glfwTerminateContextAPI(void) { \ attribs[index++] = attribName; \ attribs[index++] = attribValue; \ - assert((size_t) index < sizeof(attribs) / sizeof(attribs[0])); \ + assert(index < sizeof(attribs) / sizeof(attribs[0])); \ } // Prepare for creation of the OpenGL context @@ -339,7 +339,8 @@ int _glfwCreateContext(_GLFWwindow* window, if (_glfw.egl.KHR_create_context) { - int index = 0, mask = 0, flags = 0, strategy = 0; + int mask = 0, flags = 0, strategy = 0; + size_t index = 0; if (wndconfig->clientAPI == GLFW_OPENGL_API) { @@ -384,7 +385,7 @@ int _glfwCreateContext(_GLFWwindow* window, } else { - int index = 0; + size_t index = 0; if (wndconfig->clientAPI == GLFW_OPENGL_ES_API) setEGLattrib(EGL_CONTEXT_CLIENT_VERSION, wndconfig->glMajor); diff --git a/src/glx_context.c b/src/glx_context.c index f0f7ed06..b0e2917a 100644 --- a/src/glx_context.c +++ b/src/glx_context.c @@ -172,6 +172,8 @@ static GLXContext createLegacyContext(_GLFWwindow* window, GLXFBConfig fbconfig, GLXContext share) { + (void) window; + if (_glfw.glx.SGIX_fbconfig) { return _glfw.glx.CreateContextWithConfigSGIX(_glfw.x11.display, @@ -341,7 +343,7 @@ void _glfwTerminateContextAPI(void) { \ attribs[index++] = attribName; \ attribs[index++] = attribValue; \ - assert((size_t) index < sizeof(attribs) / sizeof(attribs[0])); \ + assert(index < sizeof(attribs) / sizeof(attribs[0])); \ } // Prepare for creation of the OpenGL context @@ -420,7 +422,8 @@ int _glfwCreateContext(_GLFWwindow* window, if (_glfw.glx.ARB_create_context) { - int index = 0, mask = 0, flags = 0, strategy = 0; + int mask = 0, flags = 0, strategy = 0; + size_t index = 0; if (wndconfig->clientAPI == GLFW_OPENGL_API) { diff --git a/src/wgl_context.c b/src/wgl_context.c index 51623de1..29dfa0d2 100644 --- a/src/wgl_context.c +++ b/src/wgl_context.c @@ -329,7 +329,7 @@ void _glfwTerminateContextAPI(void) { \ attribs[index++] = attribName; \ attribs[index++] = attribValue; \ - assert((size_t) index < sizeof(attribs) / sizeof(attribs[0])); \ + assert(index < sizeof(attribs) / sizeof(attribs[0])); \ } // Prepare for creation of the OpenGL context @@ -378,7 +378,8 @@ int _glfwCreateContext(_GLFWwindow* window, if (window->wgl.ARB_create_context) { - int index = 0, mask = 0, flags = 0, strategy = 0; + int mask = 0, flags = 0, strategy = 0; + size_t index = 0; if (wndconfig->clientAPI == GLFW_OPENGL_API) { diff --git a/src/x11_clipboard.c b/src/x11_clipboard.c index 614ba363..ac01dc6c 100644 --- a/src/x11_clipboard.c +++ b/src/x11_clipboard.c @@ -36,6 +36,9 @@ // static Bool isSelectionMessage(Display* display, XEvent* event, XPointer pointer) { + (void)display; + (void)pointer; + return event->type == SelectionRequest || event->type == SelectionNotify || event->type == SelectionClear; @@ -181,6 +184,8 @@ static Atom writeTargetToProperty(const XSelectionRequestEvent* request) void _glfwHandleSelectionClear(XEvent* event) { + (void) event; + free(_glfw.x11.selection.string); _glfw.x11.selection.string = NULL; } diff --git a/src/x11_init.c b/src/x11_init.c index 1c28e5f3..99f5af65 100644 --- a/src/x11_init.c +++ b/src/x11_init.c @@ -591,6 +591,8 @@ static void terminateDisplay(void) // static int errorHandler(Display *display, XErrorEvent* event) { + (void)display; + _glfw.x11.errorCode = event->error_code; return 0; }