Make switch fallthrough markers compatible with clang and C23

Uses _X_FALLTHROUGH from xproto 7.0.34 if available,
local fallback if xproto is older than that.

Clears warnings from clang 19.1.7 of the form:

mouse.c:1219:17: warning: unannotated fall-through between switch labels
 [-Wimplicit-fallthrough]
 1219 |                 default:
      |                 ^
mouse.c:1219:17: note: insert '[[fallthrough]];' to silence this warning
 1219 |                 default:
      |                 ^
      |                 [[fallthrough]];
mouse.c:1219:17: note: insert 'break;' to avoid fall-through
 1219 |                 default:
      |                 ^
      |                 break;

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-input-mouse/-/merge_requests/23>
This commit is contained in:
Alan Coopersmith
2025-04-21 16:19:30 -07:00
parent 2c481bb020
commit b6d147fb53
4 changed files with 14 additions and 4 deletions

View File

@@ -48,7 +48,7 @@ XORG_WITH_LINT
AC_CHECK_FUNCS([asprintf timingsafe_memcmp])
# Obtain compiler/linker options from server and required extensions
PKG_CHECK_MODULES(XORG, [xorg-server >= 1.10] xproto inputproto)
PKG_CHECK_MODULES(XORG, [xorg-server >= 1.10 xproto >= 7.0.27 inputproto])
# Define a configure option for an alternate input module directory
AC_ARG_WITH(xorg-module-dir,