enclose GCC attribute with an ifdef

Mon, 07 Jul 2025 22:41:48 +0200

author
Mike Becker <universe@uap-core.de>
date
Mon, 07 Jul 2025 22:41:48 +0200
changeset 188
5ece6e3acc84
parent 187
15763968dfd5
child 189
2c063b225183

enclose GCC attribute with an ifdef

src/glcontext.c file | annotate | diff | comparison | revisions
--- a/src/glcontext.c	Sun Jul 06 18:57:43 2025 +0200
+++ b/src/glcontext.c	Mon Jul 07 22:41:48 2025 +0200
@@ -35,7 +35,10 @@
 static void asc_gl_debug_callback(
         GLenum source, GLenum type, GLuint id, GLenum severity,
         GLsizei length, const GLchar *message,
-        __attribute__((__unused__)) const void *userParam
+#ifdef __GNUC__
+        __attribute__((__unused__))
+#endif
+        const void *userParam
 ) {
     if (type == GL_DEBUG_TYPE_ERROR) {
         asc_error("OpenGL source = %d, id = %u, type = %d, severity= %d, message = %.*s",

mercurial