SDL: Fix -Wunused-variable warning when configuring with -DSDL_X11_XSHAPE=OFF

From cfadb4c106b734f55dc99a182afa3e5856c94d0a Mon Sep 17 00:00:00 2001
From: Anonymous Maarten <[EMAIL REDACTED]>
Date: Sat, 18 Feb 2023 19:13:37 +0100
Subject: [PATCH] Fix -Wunused-variable warning when configuring with
 -DSDL_X11_XSHAPE=OFF

---
 src/video/x11/SDL_x11shape.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/video/x11/SDL_x11shape.c b/src/video/x11/SDL_x11shape.c
index dfebceb8efd6..f726dd2e358b 100644
--- a/src/video/x11/SDL_x11shape.c
+++ b/src/video/x11/SDL_x11shape.c
@@ -31,9 +31,10 @@ SDL_WindowShaper *
 X11_CreateShaper(SDL_Window *window)
 {
     SDL_WindowShaper *result = NULL;
-    SDL_ShapeData *data = NULL;
 
 #if SDL_VIDEO_DRIVER_X11_XSHAPE
+    SDL_ShapeData *data = NULL;
+
     if (SDL_X11_HAVE_XSHAPE) { /* Make sure X server supports it. */
         result = SDL_malloc(sizeof(SDL_WindowShaper));
         if (result == NULL) {
@@ -95,9 +96,11 @@ int X11_ResizeWindowShape(SDL_Window *window)
 
 int X11_SetWindowShape(SDL_WindowShaper *shaper, SDL_Surface *shape, SDL_WindowShapeMode *shape_mode)
 {
+#if SDL_VIDEO_DRIVER_X11_XSHAPE
     SDL_ShapeData *data = NULL;
     SDL_WindowData *windowdata = NULL;
     Pixmap shapemask;
+#endif
 
     if (shaper == NULL || shape == NULL || shaper->driverdata == NULL) {
         return -1;