Use _X_FALLTHROUGH macro to silence fallthrough warnings in clang as well

Raises required version of xproto to 7.0.34 (from xorgproto 2025.1)

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2299>
This commit is contained in:
Alan Coopersmith 2026-09-06 10:47:31 -07:00 • committed by Marge Bot
commit bd3ca7da06
30 changed files with 70 additions and 70 deletions

View file

@ -21,7 +21,7 @@ variables:
REPO_URL_XORGPROTO: 'https://gitlab.freedesktop.org/xorg/proto/xorgproto.git'
XORG_DEBIAN_VERSION: 'bookworm-slim'
XORG_DEBIAN_EXEC: 'env FDO_CI_CONCURRENT=${FDO_CI_CONCURRENT} bash .gitlab-ci/debian-install.sh'
XORG_DEBIAN_TAG: '2026-07-29-wayland'
XORG_DEBIAN_TAG: '2026-09-06-fallthrough'
XORG_FREEBSD_VERSION: '15.1'
XORG_FREEBSD_EXEC: ''
XORG_FREEBSD_TAG: '2026-07-09-freebsd-15.1'
@ -239,7 +239,7 @@ freebsd:
variables:
MESON_ARGS: -Dglx=false -Dglamor=false -Dudev=false -Dudev_kms=false
script:
# running of of disk space without this
# running out of disk space without this
# needed until https://gitlab.freedesktop.org/freedesktop/ci-templates/-/issues/67 is fixed
- git gc
- git clone --depth=1 $REPO_URL_XORGPROTO dep.xorgproto
@ -247,7 +247,7 @@ freebsd:
- set +e
- scp -r $PWD "vm:"
# need to install newer xorgproto
- /app/vmctl exec "cd $CI_PROJECT_NAME/dep.xorgproto && ./autogen.sh --prefix=/usr && make && make install"
- /app/vmctl exec "cd $CI_PROJECT_NAME/dep.xorgproto && ./autogen.sh --prefix=/usr/local --disable-specs && make && make install"
- /app/vmctl exec "cd $CI_PROJECT_NAME && PKG_CONFIG_PATH=\"$PKG_CONFIG_PATH\" MESON_ARGS=\"$MESON_ARGS\" MESON_BUILDDIR=\"$MESON_BUILDDIR\" .gitlab-ci/meson-build.sh --skip-test" && touch .success
# test not working yet, so skipped
# - scp -r vm:$CI_PROJECT_NAME/test-results.xml .

View file

@ -49,7 +49,7 @@ build 'https://gitlab.freedesktop.org/pixman/pixman.git' 'pixman-0.38.4'
build 'https://gitlab.freedesktop.org/xorg/lib/pthread-stubs.git' '0.4'
# we can't use the xorgproto pkgconfig files from /usr/share/pkgconfig, because
# these would add -I/usr/include to CFLAGS, which breaks cross-compilation
build 'https://gitlab.freedesktop.org/xorg/proto/xorgproto.git' 'xorgproto-2024.1' '--datadir=/lib'
build 'https://gitlab.freedesktop.org/xorg/proto/xorgproto.git' 'xorgproto-2025.1' '--datadir=/lib'
build 'https://gitlab.freedesktop.org/xorg/lib/libXau.git' 'libXau-1.0.9'
build 'https://gitlab.freedesktop.org/xorg/proto/xcbproto.git' 'xcb-proto-1.14.1'
build 'https://gitlab.freedesktop.org/xorg/lib/libxcb.git' 'libxcb-1.14'

View file

@ -136,9 +136,9 @@ ninja -C _build -j${FDO_CI_CONCURRENT:-4} install
cd ..
rm -rf drm
# xserver requires xorgproto >= 2024.1 for XWAYLAND
# xserver requires xorgproto >= 2025.1 for _X_FALLTHROUGH
# but Debian bookworm has only 2022.1
git clone https://gitlab.freedesktop.org/xorg/proto/xorgproto.git --depth 1 --branch=xorgproto-2024.1
git clone https://gitlab.freedesktop.org/xorg/proto/xorgproto.git --depth 1 --branch=xorgproto-2025.1
pushd xorgproto
./autogen.sh
make -j${FDO_CI_CONCURRENT:-4} install

View file

@ -290,19 +290,19 @@ ProcXTestFakeInput(ClientPtr client)
switch (dv->num_valuators) {
case 6:
valuators[base + 5] = dv->valuator5;
/* fallthrough */
_X_FALLTHROUGH; /* fallthrough */
case 5:
valuators[base + 4] = dv->valuator4;
/* fallthrough */
_X_FALLTHROUGH; /* fallthrough */
case 4:
valuators[base + 3] = dv->valuator3;
/* fallthrough */
_X_FALLTHROUGH; /* fallthrough */
case 3:
valuators[base + 2] = dv->valuator2;
/* fallthrough */
_X_FALLTHROUGH; /* fallthrough */
case 2:
valuators[base + 1] = dv->valuator1;
/* fallthrough */
_X_FALLTHROUGH; /* fallthrough */
case 1:
valuators[base] = dv->valuator0;
break;

View file

@ -1136,7 +1136,7 @@ FakeAllocColor(ColormapPtr pmap, xColorItem * item)
item->pixel = temp;
break;
}
/* fall through ... */
_X_FALLTHROUGH; /* fall through ... */
case StaticColor:
case StaticGray:
item->pixel = FindBestPixel(pmap->red, entries, &rgb, PSEUDOMAP);
@ -1257,7 +1257,7 @@ FindBestPixel(EntryPtr pentFirst, int size, xrgb * prgb, int channel)
case PSEUDOMAP:
dg = (long) pent->co.local.green - prgb->green;
db = (long) pent->co.local.blue - prgb->blue;
/* fallthrough */
_X_FALLTHROUGH; /* fallthrough */
case REDMAP:
dr = (long) pent->co.local.red - prgb->red;
break;

View file

@ -620,19 +620,19 @@ FixDeviceValuator(DeviceIntPtr dev, deviceValuator * ev, ValuatorClassPtr v,
switch (ev->num_valuators) {
case 6:
ev->valuator5 = v->axisVal[first + 5];
/* fallthrough */
_X_FALLTHROUGH; /* fallthrough */
case 5:
ev->valuator4 = v->axisVal[first + 4];
/* fallthrough */
_X_FALLTHROUGH; /* fallthrough */
case 4:
ev->valuator3 = v->axisVal[first + 3];
/* fallthrough */
_X_FALLTHROUGH; /* fallthrough */
case 3:
ev->valuator2 = v->axisVal[first + 2];
/* fallthrough */
_X_FALLTHROUGH; /* fallthrough */
case 2:
ev->valuator1 = v->axisVal[first + 1];
/* fallthrough */
_X_FALLTHROUGH; /* fallthrough */
case 1:
ev->valuator0 = v->axisVal[first];
break;
@ -671,10 +671,10 @@ FixDeviceStateNotify(DeviceIntPtr dev, deviceStateNotify * ev, KeyClassPtr k,
switch (ev->num_valuators) {
case 3:
ev->valuator2 = v->axisVal[first + 2];
/* fallthrough */
_X_FALLTHROUGH; /* fallthrough */
case 2:
ev->valuator1 = v->axisVal[first + 1];
/* fallthrough */
_X_FALLTHROUGH; /* fallthrough */
case 1:
ev->valuator0 = v->axisVal[first];
break;

View file

@ -121,7 +121,7 @@ EventToCore(InternalEvent *event, xEvent **core_out, int *count_out)
goto out;
}
}
/* fallthrough */
_X_FALLTHROUGH; /* fallthrough */
case ET_ButtonPress:
case ET_ButtonRelease:
case ET_KeyPress:

View file

@ -4436,7 +4436,7 @@ FreezeThisEventIfNeededForSyncGrab(DeviceIntPtr thisDev, InternalEvent *event)
else
dev->deviceGrab.sync.other = grab;
}
/* fall through */
_X_FALLTHROUGH; /* fall through */
case FREEZE_NEXT_EVENT:
grabinfo->sync.state = FROZEN_WITH_EVENT;
FreezeThaw(thisDev, TRUE);

View file

@ -249,7 +249,7 @@ extern _X_EXPORT void fbSetBits(FbStip * bits, int stride, FbStip data);
break; \
case sizeof (FbBits) - 3: \
FbStorePart(dst,sizeof (FbBits) - 3,CARD8,xor); \
/* fallthrough */ \
_X_FALLTHROUGH; /* fallthrough */ \
case sizeof (FbBits) - 2: \
FbStorePart(dst,sizeof (FbBits) - 2,CARD16,xor); \
break; \

View file

@ -2435,7 +2435,7 @@ __glXDisp_QueryServerString(__GLXclientState * cl, GLbyte * pc)
ptr = pGlxScreen->glvnd;
break;
}
/* else fall through */
_X_FALLTHROUGH; /* else fall through */
default:
return BadValue;
}

View file

@ -254,25 +254,25 @@ KdPointerProc(DeviceIntPtr pDevice, int onoff)
default:
case 7:
btn_labels[6] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_HWHEEL_RIGHT);
/* fallthrough */
_X_FALLTHROUGH; /* fallthrough */
case 6:
btn_labels[5] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_HWHEEL_LEFT);
/* fallthrough */
_X_FALLTHROUGH; /* fallthrough */
case 5:
btn_labels[4] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_WHEEL_DOWN);
/* fallthrough */
_X_FALLTHROUGH; /* fallthrough */
case 4:
btn_labels[3] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_WHEEL_UP);
/* fallthrough */
_X_FALLTHROUGH; /* fallthrough */
case 3:
btn_labels[2] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_RIGHT);
/* fallthrough */
_X_FALLTHROUGH; /* fallthrough */
case 2:
btn_labels[1] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_MIDDLE);
/* fallthrough */
_X_FALLTHROUGH; /* fallthrough */
case 1:
btn_labels[0] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_LEFT);
/* fallthrough */
_X_FALLTHROUGH; /* fallthrough */
case 0:
break;
}

View file

@ -686,7 +686,7 @@ DGACreateColormap(int index, ClientPtr client, int id, int mode, int alloc)
case DirectColor:
case TrueColor:
pVisual->ColormapEntries = 1 << pVisual->bitsPerRGBValue;
/* fall through */
_X_FALLTHROUGH; /* fall through */
case StaticColor:
pVisual->redMask = pMode->red_mask;
pVisual->greenMask = pMode->green_mask;

View file

@ -649,7 +649,7 @@ localQueryLargestOffscreenArea(ScreenPtr pScreen,
pbox = RegionRects(newRegion);
break;
}
/* fallthrough */
_X_FALLTHROUGH; /* fallthrough */
case 1:
if (offman->NumUsedAreas) {
FBLinkPtr pLink;
@ -672,7 +672,7 @@ localQueryLargestOffscreenArea(ScreenPtr pScreen,
pbox = RegionRects(newRegion);
break;
}
/* fallthrough */
_X_FALLTHROUGH; /* fallthrough */
default:
nbox = RegionNumRects(offman->FreeBoxes);
pbox = RegionRects(offman->FreeBoxes);

View file

@ -604,7 +604,7 @@ DRIScreenInit(ScreenPtr pScreen, DRIInfoPtr pDRIInfo, int *pDRMFD)
pDRIPriv->hiddenContextStore,
DRI_NO_CONTEXT, NULL);
}
/* fall through */
_X_FALLTHROUGH; /* fall through */
case DRI_SERVER_SWAP:
/* For swap methods of DRI_SERVER_SWAP and DRI_HIDE_X_CONTEXT

View file

@ -656,7 +656,7 @@ ms_dri2_frame_event_handler(uint64_t msc,
ms_dri2_exchange_buffers(drawable, frame_info->front, frame_info->back);
break;
}
/* else fall through */
_X_FALLTHROUGH; /* else fall through */
case MS_DRI2_QUEUE_SWAP:
ms_dri2_blit_swap(drawable, frame_info->front, frame_info->back);
DRI2SwapComplete(frame_info->client, drawable, msc, tv_sec, tv_usec,

View file

@ -1383,17 +1383,17 @@ xf86InitialPanning(ScrnInfoPtr scrn)
output->initialBorder[1] = brdr[1];
output->initialBorder[2] = brdr[2];
output->initialBorder[3] = brdr[3];
/* fall through */
_X_FALLTHROUGH; /* fall through */
case 8:
output->initialTrackingArea.x1 = track_left;
output->initialTrackingArea.y1 = track_top;
output->initialTrackingArea.x2 = track_left + track_width;
output->initialTrackingArea.y2 = track_top + track_height;
/* fall through */
_X_FALLTHROUGH; /* fall through */
case 4:
output->initialTotalArea.x1 = left;
output->initialTotalArea.y1 = top;
/* fall through */
_X_FALLTHROUGH; /* fall through */
case 2:
output->initialTotalArea.x2 = output->initialTotalArea.x1 + width;
output->initialTotalArea.y2 = output->initialTotalArea.y1 + height;

View file

@ -244,7 +244,7 @@ xf86OpenConsole(void)
if (i >= 310)
goto acquire_vt;
#endif
/* otherwise fall through */
_X_FALLTHROUGH; /* otherwise fall through */
case PCVT:
#if !(defined(__NetBSD__) && (__NetBSD_Version__ >= 200000000))
/*

View file

@ -113,13 +113,13 @@ xf86parseFlagsSection(XF86ConfFlagsPtr ptr)
*/
case DEFAULTLAYOUT:
strvalue = TRUE;
/* fallthrough */
_X_FALLTHROUGH; /* fallthrough */
case BLANKTIME:
case STANDBYTIME:
case SUSPENDTIME:
case OFFTIME:
hasvalue = TRUE;
/* fallthrough */
_X_FALLTHROUGH; /* fallthrough */
case DONTZAP:
case DONTZOOM:
case DISABLEVIDMODE:

View file

@ -217,7 +217,7 @@ xf86parseInputClassSection(void)
break;
case NOMATCH_PRODUCT:
matchtype = MATCH_NEGATED;
/* fallthrough */
_X_FALLTHROUGH; /* fallthrough */
case MATCH_PRODUCT:
if (xf86getSubToken(&(ptr->comment)) != STRING)
Error(QUOTE_MSG, "MatchProduct");
@ -228,7 +228,7 @@ xf86parseInputClassSection(void)
break;
case NOMATCH_VENDOR:
matchtype = MATCH_NEGATED;
/* fallthrough */
_X_FALLTHROUGH; /* fallthrough */
case MATCH_VENDOR:
if (xf86getSubToken(&(ptr->comment)) != STRING)
Error(QUOTE_MSG, "MatchVendor");
@ -239,7 +239,7 @@ xf86parseInputClassSection(void)
break;
case NOMATCH_DEVICE_PATH:
matchtype = MATCH_NEGATED;
/* fallthrough */
_X_FALLTHROUGH; /* fallthrough */
case MATCH_DEVICE_PATH:
if (xf86getSubToken(&(ptr->comment)) != STRING)
Error(QUOTE_MSG, "MatchDevicePath");
@ -250,7 +250,7 @@ xf86parseInputClassSection(void)
break;
case NOMATCH_OS:
matchtype = MATCH_NEGATED;
/* fallthrough */
_X_FALLTHROUGH; /* fallthrough */
case MATCH_OS:
if (xf86getSubToken(&(ptr->comment)) != STRING)
Error(QUOTE_MSG, "MatchOS");
@ -261,7 +261,7 @@ xf86parseInputClassSection(void)
break;
case NOMATCH_PNPID:
matchtype = MATCH_NEGATED;
/* fallthrough */
_X_FALLTHROUGH; /* fallthrough */
case MATCH_PNPID:
if (xf86getSubToken(&(ptr->comment)) != STRING)
Error(QUOTE_MSG, "MatchPnPID");
@ -272,7 +272,7 @@ xf86parseInputClassSection(void)
break;
case NOMATCH_USBID:
matchtype = MATCH_NEGATED;
/* fallthrough */
_X_FALLTHROUGH; /* fallthrough */
case MATCH_USBID:
if (xf86getSubToken(&(ptr->comment)) != STRING)
Error(QUOTE_MSG, "MatchUSBID");
@ -283,7 +283,7 @@ xf86parseInputClassSection(void)
break;
case NOMATCH_DRIVER:
matchtype = MATCH_NEGATED;
/* fallthrough */
_X_FALLTHROUGH; /* fallthrough */
case MATCH_DRIVER:
if (xf86getSubToken(&(ptr->comment)) != STRING)
Error(QUOTE_MSG, "MatchDriver");
@ -294,7 +294,7 @@ xf86parseInputClassSection(void)
break;
case NOMATCH_TAG:
matchtype = MATCH_NEGATED;
/* fallthrough */
_X_FALLTHROUGH; /* fallthrough */
case MATCH_TAG:
if (xf86getSubToken(&(ptr->comment)) != STRING)
Error(QUOTE_MSG, "MatchTag");
@ -305,7 +305,7 @@ xf86parseInputClassSection(void)
break;
case NOMATCH_LAYOUT:
matchtype = MATCH_NEGATED;
/* fallthrough */
_X_FALLTHROUGH; /* fallthrough */
case MATCH_LAYOUT:
if (xf86getSubToken(&(ptr->comment)) != STRING)
Error(QUOTE_MSG, "MatchLayout");

View file

@ -65,7 +65,7 @@ add_project_arguments(common_wflags, language : ['c', 'objc'])
libdrm_req = '>= 2.4.116'
libselinux_req = '>= 2.0.86'
xext_req = '>= 1.0.99.4'
xproto_req = '>= 7.0.31'
xproto_req = '>= 7.0.34'
wayland_req = '>= 1.26.0'
wayland_protocols_req = '>= 1.38'
gbm_req = '>= 10.2'

View file

@ -1436,7 +1436,7 @@ miArcJoin(DrawablePtr pDraw, GCPtr pGC, miArcFacePtr pLeft,
polyLen = 5;
break;
}
/* fallthrough */
_X_FALLTHROUGH; /* fallthrough */
case JoinBevel:
poly[0] = corner;
poly[1] = center;

View file

@ -519,7 +519,7 @@ miInitVisuals(VisualPtr * visualp, DepthPtr * depthp, int *nvisualp,
case DirectColor:
case TrueColor:
visual->ColormapEntries = _CE(d);
/* fall through */
_X_FALLTHROUGH; /* fall through */
case StaticColor:
visual->redMask = visuals->redMask;
visual->greenMask = visuals->greenMask;

View file

@ -552,7 +552,7 @@ miOverlayComputeClips(WindowPtr pParent,
}
return;
}
/* fall through */
_X_FALLTHROUGH; /* fall through */
default:
if (dx || dy) {
RegionTranslate(&tParent->borderClip, dx, dy);
@ -802,7 +802,7 @@ miOverlayValidateTree(WindowPtr pParent, WindowPtr pChild, /* first child e
if (!((*pPriv->InOverlay) (newParent)))
RegionSubtract(&tParent->valdata->exposed, &totalClip,
&tParent->clipList);
/* fall through */
_X_FALLTHROUGH; /* fall through */
case VTMap:
RegionCopy(&tParent->clipList, &totalClip);
if (!((*pPriv->InOverlay) (newParent)))

View file

@ -324,7 +324,7 @@ miComputeClips(WindowPtr pParent,
}
return;
}
/* fall through */
_X_FALLTHROUGH; /* fall through */
default:
/*
* To calculate exposures correctly, we have to translate the old
@ -723,7 +723,7 @@ miValidateTree(WindowPtr pParent, /* Parent to validate */
*/
RegionSubtract(&pParent->valdata->after.exposed,
&totalClip, &pParent->clipList);
/* fall through */
_X_FALLTHROUGH; /* fall through */
case VTMap:
RegionCopy(&pParent->clipList, &totalClip);
pParent->drawable.serialNumber = NEXT_SERIAL_NUMBER;

View file

@ -244,7 +244,7 @@ RootlessComputeClips(WindowPtr pParent, ScreenPtr pScreen,
}
return;
}
/* fall through */
_X_FALLTHROUGH; /* fall through */
default:
/*
* To calculate exposures correctly, we have to translate the old

View file

@ -418,13 +418,13 @@ NextDPMSTimeout(INT32 timeout)
switch (DPMSPowerLevel) {
case DPMSModeOn:
DPMS_CHECK_TIMEOUT(DPMSStandbyTime)
/* fallthrough */
_X_FALLTHROUGH; /* fallthrough */
case DPMSModeStandby:
DPMS_CHECK_TIMEOUT(DPMSSuspendTime)
/* fallthrough */
_X_FALLTHROUGH; /* fallthrough */
case DPMSModeSuspend:
DPMS_CHECK_TIMEOUT(DPMSOffTime)
/* fallthrough */
_X_FALLTHROUGH; /* fallthrough */
default: /* DPMSModeOff */
return 0;
}

View file

@ -126,7 +126,7 @@ miBuildRenderColormap(ColormapPtr pColormap, Pixel * pixels, int *nump)
case PictureCmapPolicyColor:
cube = NUM_CUBE_LEVELS;
/* fall through ... */
_X_FALLTHROUGH; /* fall through ... */
case PictureCmapPolicyGray:
gray = NUM_GRAY_LEVELS;
break;

View file

@ -225,7 +225,7 @@ reply_XIQueryDevice_data(ClientPtr client, int len, void *data)
}
}
/* fall through */
_X_FALLTHROUGH; /* fall through */
case 2: /* VCP and mouse have the same properties except for scroll */
{
if (info->deviceid == 2) /* VCP */

View file

@ -142,7 +142,7 @@ _XkbDDXBeepExpire(OsTimerPtr timer, CARD32 now, void *arg)
switch (xkbInfo->beepType) {
default:
ErrorF("[xkb] Unknown beep type %d\n", xkbInfo->beepType);
/* fallthrough */
_X_FALLTHROUGH; /* fallthrough */
case _BEEP_NONE:
duration = 0;
break;
@ -211,7 +211,7 @@ _XkbDDXBeepExpire(OsTimerPtr timer, CARD32 now, void *arg)
case _BEEP_LED_CHANGE:
if (name == None)
name = ledChange;
/* fallthrough */
_X_FALLTHROUGH; /* fallthrough */
case _BEEP_FEATURE_CHANGE:
if (name == None)
name = featureChange;
@ -242,11 +242,11 @@ _XkbDDXBeepExpire(OsTimerPtr timer, CARD32 now, void *arg)
case _BEEP_SLOW_PRESS:
if (name == None)
name = slowPress;
/* fallthrough */
_X_FALLTHROUGH; /* fallthrough */
case _BEEP_SLOW_ACCEPT:
if (name == None)
name = slowAccept;
/* fallthrough */
_X_FALLTHROUGH; /* fallthrough */
case _BEEP_SLOW_RELEASE:
if (name == None)
name = slowRelease;
@ -256,7 +256,7 @@ _XkbDDXBeepExpire(OsTimerPtr timer, CARD32 now, void *arg)
case _BEEP_BOUNCE_REJECT:
if (name == None)
name = bounceReject;
/* fallthrough */
_X_FALLTHROUGH; /* fallthrough */
case _BEEP_SLOW_REJECT:
if (name == None)
name = slowReject;

View file

@ -659,7 +659,7 @@ _XkbFilterPointerBtn(XkbSrvInfoPtr xkbi,
break;
}
/* fallthrough */
_X_FALLTHROUGH; /* fallthrough */
case XkbSA_PtrBtn:
XkbFakeDeviceButton(xkbi->device, 0, button);
break;