From fdbd38121bfe84d39d401f52c4c50c4580a52997 Mon Sep 17 00:00:00 2001 From: Daniel van Vugt Date: Wed, 30 Aug 2023 13:30:16 +0800 Subject: [PATCH] x11/events: Don't define an unused function when tracing is disabled MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes a compiler warning: ``` src/x11/events.c:523:1: warning: ‘get_event_name’ defined but not used [-Wunused-function] 523 | get_event_name (MetaX11Display *x11_display, | ^~~~~~~~~~~~~~ ``` Part-of: --- src/x11/events.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/x11/events.c b/src/x11/events.c index 5e749deed..448194125 100644 --- a/src/x11/events.c +++ b/src/x11/events.c @@ -519,6 +519,7 @@ get_extension_event_name (MetaX11Display *x11_display, return NULL; } +#ifdef COGL_HAS_TRACING static const char * get_event_name (MetaX11Display *x11_display, XEvent *event) @@ -543,6 +544,7 @@ get_event_name (MetaX11Display *x11_display, return "Unknown event"; } +#endif static void meta_spew_core_event (MetaX11Display *x11_display,