diff --git a/.gitignore b/.gitignore index 8ed24d981..9b6634759 100644 --- a/.gitignore +++ b/.gitignore @@ -102,3 +102,4 @@ tests/triangle-vulkan tests/window tests/windows +*.o diff --git a/src/context.c b/src/context.c index f4fa63ad7..da81ac5d8 100644 --- a/src/context.c +++ b/src/context.c @@ -359,7 +359,7 @@ GLFWbool _glfwRefreshContextAttribs(_GLFWwindow* window, window->context.source = ctxconfig->source; window->context.client = GLFW_OPENGL_API; - previous = _glfwPlatformGetTls(&_glfw.contextSlot); + previous = (_GLFWwindow *)_glfwPlatformGetTls(&_glfw.contextSlot); glfwMakeContextCurrent((GLFWwindow*) window); if (_glfwPlatformGetTls(&_glfw.contextSlot) != window) return GLFW_FALSE; @@ -620,7 +620,7 @@ GLFWAPI void glfwMakeContextCurrent(GLFWwindow* handle) _GLFWwindow* window = (_GLFWwindow*) handle; _GLFWwindow* previous; - previous = _glfwPlatformGetTls(&_glfw.contextSlot); + previous = (_GLFWwindow *)_glfwPlatformGetTls(&_glfw.contextSlot); if (window && window->context.client == GLFW_NO_API) { @@ -642,7 +642,7 @@ GLFWAPI void glfwMakeContextCurrent(GLFWwindow* handle) GLFWAPI GLFWwindow* glfwGetCurrentContext(void) { _GLFW_REQUIRE_INIT_OR_RETURN(NULL); - return _glfwPlatformGetTls(&_glfw.contextSlot); + return (GLFWwindow *)_glfwPlatformGetTls(&_glfw.contextSlot); } GLFWAPI void glfwSwapBuffers(GLFWwindow* handle) @@ -668,7 +668,7 @@ GLFWAPI void glfwSwapInterval(int interval) _GLFW_REQUIRE_INIT(); - window = _glfwPlatformGetTls(&_glfw.contextSlot); + window = (_GLFWwindow *)_glfwPlatformGetTls(&_glfw.contextSlot); if (!window) { _glfwInputError(GLFW_NO_CURRENT_CONTEXT, @@ -686,7 +686,7 @@ GLFWAPI int glfwExtensionSupported(const char* extension) _GLFW_REQUIRE_INIT_OR_RETURN(GLFW_FALSE); - window = _glfwPlatformGetTls(&_glfw.contextSlot); + window = (_GLFWwindow *)_glfwPlatformGetTls(&_glfw.contextSlot); if (!window) { _glfwInputError(GLFW_NO_CURRENT_CONTEXT, @@ -752,7 +752,7 @@ GLFWAPI GLFWglproc glfwGetProcAddress(const char* procname) _GLFW_REQUIRE_INIT_OR_RETURN(NULL); - window = _glfwPlatformGetTls(&_glfw.contextSlot); + window = (_GLFWwindow *)_glfwPlatformGetTls(&_glfw.contextSlot); if (!window) { _glfwInputError(GLFW_NO_CURRENT_CONTEXT, @@ -762,4 +762,3 @@ GLFWAPI GLFWglproc glfwGetProcAddress(const char* procname) return window->context.getProcAddress(procname); } - diff --git a/src/egl_context.c b/src/egl_context.c index 0ef7f7295..49da42388 100644 --- a/src/egl_context.c +++ b/src/egl_context.c @@ -123,10 +123,10 @@ static GLFWbool chooseEGLConfig(const _GLFWctxconfig* ctxconfig, return GLFW_FALSE; } - nativeConfigs = _glfw_calloc(nativeCount, sizeof(EGLConfig)); + nativeConfigs = (EGLConfig *)_glfw_calloc(nativeCount, sizeof(EGLConfig)); eglGetConfigs(_glfw.egl.display, nativeConfigs, nativeCount, &nativeCount); - usableConfigs = _glfw_calloc(nativeCount, sizeof(_GLFWfbconfig)); + usableConfigs = (_GLFWfbconfig *)_glfw_calloc(nativeCount, sizeof(_GLFWfbconfig)); usableCount = 0; for (i = 0; i < nativeCount; i++) @@ -312,7 +312,7 @@ static int extensionSupportedEGL(const char* extension) static GLFWglproc getProcAddressEGL(const char* procname) { - _GLFWwindow* window = _glfwPlatformGetTls(&_glfw.contextSlot); + _GLFWwindow* window = (_GLFWwindow *)_glfwPlatformGetTls(&_glfw.contextSlot); assert(window != NULL); if (window->context.egl.client) @@ -967,4 +967,3 @@ GLFWAPI int glfwGetEGLConfig(GLFWwindow* handle, EGLConfig* config) *config = window->context.egl.config; return GLFW_TRUE; } - diff --git a/src/monitor.c b/src/monitor.c index 9457bc9fe..7a4b81fe2 100644 --- a/src/monitor.c +++ b/src/monitor.c @@ -484,7 +484,7 @@ GLFWAPI void glfwSetGamma(GLFWmonitor* handle, float gamma) if (!original) return; - values = _glfw_calloc(original->size, sizeof(unsigned short)); + values = (unsigned short*)_glfw_calloc(original->size, sizeof(unsigned short)); for (i = 0; i < original->size; i++) { @@ -552,4 +552,3 @@ GLFWAPI void glfwSetGammaRamp(GLFWmonitor* handle, const GLFWgammaramp* ramp) _glfw.platform.setGammaRamp(monitor, ramp); } - diff --git a/src/null_monitor.c b/src/null_monitor.c index a9b528f03..314751108 100644 --- a/src/null_monitor.c +++ b/src/null_monitor.c @@ -103,7 +103,7 @@ void _glfwGetMonitorWorkareaNull(_GLFWmonitor* monitor, GLFWvidmode* _glfwGetVideoModesNull(_GLFWmonitor* monitor, int* found) { - GLFWvidmode* mode = _glfw_calloc(1, sizeof(GLFWvidmode)); + GLFWvidmode* mode = (GLFWvidmode*)_glfw_calloc(1, sizeof(GLFWvidmode)); *mode = getVideoMode(); *found = 1; return mode; @@ -157,4 +157,3 @@ void _glfwSetGammaRampNull(_GLFWmonitor* monitor, const GLFWgammaramp* ramp) memcpy(monitor->null.ramp.green, ramp->green, sizeof(short) * ramp->size); memcpy(monitor->null.ramp.blue, ramp->blue, sizeof(short) * ramp->size); } - diff --git a/src/null_window.c b/src/null_window.c index f0e1dcc9a..6c8f7e294 100644 --- a/src/null_window.c +++ b/src/null_window.c @@ -706,8 +706,8 @@ void _glfwGetRequiredInstanceExtensionsNull(char** extensions) if (!_glfw.vk.KHR_surface || !_glfw.vk.EXT_headless_surface) return; - extensions[0] = "VK_KHR_surface"; - extensions[1] = "VK_EXT_headless_surface"; + extensions[0] = (char*)"VK_KHR_surface"; + extensions[1] = (char*)"VK_EXT_headless_surface"; } GLFWbool _glfwGetPhysicalDevicePresentationSupportNull(VkInstance instance, @@ -746,4 +746,3 @@ VkResult _glfwCreateWindowSurfaceNull(VkInstance instance, return err; } -