From 68710dd9201d44962a962fdb622a068a410d27d7 Mon Sep 17 00:00:00 2001 From: Nigel Stewart Date: Thu, 19 Jun 2025 19:44:22 +1000 Subject: [PATCH] gcc: Resolve compilation warnings in EGL mode --- auto/src/glewinfo_tail.c | 4 +++- src/visualinfo.c | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/auto/src/glewinfo_tail.c b/auto/src/glewinfo_tail.c index fe51168..10448d4 100644 --- a/auto/src/glewinfo_tail.c +++ b/auto/src/glewinfo_tail.c @@ -195,7 +195,6 @@ GLboolean glewCreateContext (struct createParams *params) EGLDeviceEXT devices[1]; EGLint numDevices; EGLSurface surface; - EGLint majorVersion, minorVersion; EGLint configAttribs[] = { EGL_SURFACE_TYPE, EGL_WINDOW_BIT, EGL_RED_SIZE, 1, @@ -229,6 +228,8 @@ GLboolean glewCreateContext (struct createParams *params) PFNEGLMAKECURRENTPROC makeCurrent = NULL; PFNEGLCREATEPBUFFERSURFACEPROC createPbufferSurface = NULL; + (void) params; /* not used */ + /* Load necessary entry points */ queryDevices = (PFNEGLQUERYDEVICESEXTPROC) eglGetProcAddress("eglQueryDevicesEXT"); getPlatformDisplay = (PFNEGLGETPLATFORMDISPLAYEXTPROC) eglGetProcAddress("eglGetPlatformDisplayEXT"); @@ -483,6 +484,7 @@ void glewDestroyContext () GLboolean glewCreateContext (struct createParams *params) { /* TODO: Haiku: We need to call C++ code here */ + (void) params; /* not used */ return GL_FALSE; } diff --git a/src/visualinfo.c b/src/visualinfo.c index 1de1fa7..6620fd1 100644 --- a/src/visualinfo.c +++ b/src/visualinfo.c @@ -260,6 +260,7 @@ void PrintExtensions (const char* s) void VisualInfo (GLContext* ctx) { + (void) ctx; /* not used */ } #elif defined(_WIN32) @@ -1049,13 +1050,13 @@ void InitContext (GLContext* ctx) GLboolean CreateContext (GLContext* ctx) { + (void) ctx; /* not used */ return GL_FALSE; } void DestroyContext (GLContext* ctx) { - if (NULL == ctx) return; - return; + (void) ctx; /* not used */ } /* ------------------------------------------------------------------------ */