Skip to content

Commit

Permalink
Fix a compilation error when DEBUG is undefined
Browse files Browse the repository at this point in the history
Fixes #214

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
  • Loading branch information
whot committed Jan 16, 2022
1 parent dd50f2d commit 93b7ff5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ jobs:
- clang
meson_options:
- ''
- '-Ddebug-messages=false'
# clang requires b_lundef=false for b_santize, see
# https://github.com/mesonbuild/meson/issues/764
- '-Db_sanitize=address,undefined -Db_lundef=false'
Expand Down
8 changes: 2 additions & 6 deletions src/x11/xf86Wacom.c
Original file line number Diff line number Diff line change
Expand Up @@ -700,9 +700,7 @@ void wcmClose(WacomDevicePtr priv)

static int wcmReady(WacomDevicePtr priv)
{
#ifdef DEBUG
InputInfoPtr pInfo = priv->frontend;
#endif
int n = xf86WaitForInput(pInfo->fd, 0);
if (n < 0) {
int saved_errno = errno;
Expand Down Expand Up @@ -842,12 +840,10 @@ static int wcmDevSwitchMode(ClientPtr client, DeviceIntPtr dev, int mode)
{
InputInfoPtr pInfo = (InputInfoPtr)dev->public.devicePrivate;
Bool is_absolute = TRUE;
#ifdef DEBUG
WacomDevicePtr priv = (WacomDevicePtr)pInfo->private;

DBG(3, priv, "dev=%p mode=%d\n",
(void *)dev, mode);
#endif
DBG(3, priv, "dev=%p mode=%d\n", (void *)dev, mode);

if (mode != Absolute) {
if (mode != Relative)
return XI_BadMode;
Expand Down

0 comments on commit 93b7ff5

Please sign in to comment.