From 5b73a788da6852fce5341eb3c4aa66c8ba7ced2b Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Mon, 4 Dec 2023 02:53:27 +0300 Subject: [PATCH] ref: gl: disable unused variable warning for GL functions defintions --- ref/gl/gl_export.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ref/gl/gl_export.h b/ref/gl/gl_export.h index 518337e9..88a4dc80 100644 --- a/ref/gl/gl_export.h +++ b/ref/gl/gl_export.h @@ -892,6 +892,11 @@ typedef float GLmatrix[16]; #define WGL_SAMPLE_BUFFERS_ARB 0x2041 #define WGL_SAMPLES_ARB 0x2042 +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif + #if defined( XASH_GL_STATIC ) && !defined( REF_GL_KEEP_MANGLED_FUNCTIONS ) #define GL_FUNCTION( name ) name #elif defined( XASH_GL_STATIC ) && defined( REF_GL_KEEP_MANGLED_FUNCTIONS ) @@ -1861,4 +1866,8 @@ APIENTRY_LINKAGE void GL_FUNCTION( glTexImage2DMultisample )(GLenum target, GLsi #define pglSwapInterval glSwapInterval #endif +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif + #endif//GL_EXPORT_H