From cdcd9c194abaad528d26b5274d4c4beabd4ee9cf Mon Sep 17 00:00:00 2001 From: Marco Lizza Date: Thu, 29 Feb 2024 01:57:41 +0100 Subject: [PATCH] Fixing `dlsym` cast warning. --- src/posix_module.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/posix_module.c b/src/posix_module.c index 7d81c672..8dd7d32f 100644 --- a/src/posix_module.c +++ b/src/posix_module.c @@ -44,10 +44,17 @@ void _glfwPlatformFreeModule(void* module) dlclose(module); } +#if defined(__GNUC__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wpedantic" +#endif GLFWproc _glfwPlatformGetModuleSymbol(void* module, const char* name) { - return dlsym(module, name); + return (GLFWproc)dlsym(module, name); } +#if defined(__GNUC__) + #pragma GCC diagnostic pop +#endif #endif // GLFW_BUILD_POSIX_MODULE