From f41335eb6559bd3da64470ffe32a0e68899c11bd Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 28 May 2022 17:40:43 -0400 Subject: Omit cursor_names if XCursor is not available This avoids a Wunused-const-variable warning with GCC. --- src/x11.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/x11.c b/src/x11.c index 1b83d98..cd3fbb0 100644 --- a/src/x11.c +++ b/src/x11.c @@ -67,6 +67,7 @@ enum WmClientStateMessageAction { #define NUM_CURSORS ((unsigned)PUGL_CURSOR_UP_DOWN + 1u) +#ifdef HAVE_XCURSOR static const char* const cursor_names[NUM_CURSORS] = { "default", // ARROW "text", // CARET @@ -76,6 +77,7 @@ static const char* const cursor_names[NUM_CURSORS] = { "sb_h_double_arrow", // LEFT_RIGHT "sb_v_double_arrow" // UP_DOWN }; +#endif static bool initXSync(PuglWorldInternals* const impl) -- cgit v1.2.1