x11/events: Don't define an unused function when tracing is disabled

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: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3223>
This commit is contained in:
Daniel van Vugt 2023-08-30 13:30:16 +08:00 committed by Marge Bot
parent aed9f7eb9d
commit fdbd38121b

View File

@ -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,