summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Kuehne <thomas@kuehne.cn>2021-12-11 18:31:12 +0100
committerAlan Coopersmith <alan.coopersmith@oracle.com>2022-04-03 14:54:08 -0700
commit46df61a5b8e7171d97614b8553221b5ea1debcdd (patch)
tree235145864b7aaefee9e99e0e88655a7e54e99be1
parent4158bd9d4269b237cacc24ce458ec7751a11a2cd (diff)
fix -Wunused-[...] compiler warnings
xdpyinfo.c:148:1: warning: ‘silent_errors’ defined but not used [-Wunused-function] 148 | silent_errors(_X_UNUSED Display *dpy, _X_UNUSED XErrorEvent *ev) xdpyinfo.c:155:14: warning: ‘old_handler’ defined but not used [-Wunused-variable] 155 | static int (*old_handler)(Display *, XErrorEvent *) = NULL; Signed-off-by: Thomas Kuehne <thomas@kuehne.cn>
-rw-r--r--xdpyinfo.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/xdpyinfo.c b/xdpyinfo.c
index 2bcc32c..dda04c7 100644
--- a/xdpyinfo.c
+++ b/xdpyinfo.c
@@ -144,6 +144,7 @@ in this Software without prior written authorization from The Open Group.
static char *ProgramName;
static Bool queryExtensions = False;
+#if defined(XF86MISC) || defined(XFreeXDGA)
static int
silent_errors(_X_UNUSED Display *dpy, _X_UNUSED XErrorEvent *ev)
{
@@ -151,6 +152,7 @@ silent_errors(_X_UNUSED Display *dpy, _X_UNUSED XErrorEvent *ev)
}
static int (*old_handler)(Display *, XErrorEvent *) = NULL;
+#endif
static int print_event_mask(char *buf, int lastcol, int indent, long mask);