OneDataCard32: add do ... while (0) to avoid -Wextra-semi-stmt warnings

Clears 13 warnings from clang of the form:

Backgnd.c:44:72: warning: empty expression statement has no effect;
 remove unnecessary ';' to silence this warning [-Wextra-semi-stmt]
    OneDataCard32 (dpy, NEXTPTR(req,xChangeWindowAttributesReq), pixel);
                                                                       ^

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/272>
This commit is contained in:
Alan Coopersmith 2024-11-10 11:52:19 -08:00
parent 68e6caad8f
commit 41c4aa408c

View file

@ -765,7 +765,7 @@ extern void _XRead32(
/* srcvar must be a variable for large architecture version */
#define OneDataCard32(dpy,dstaddr,srcvar) \
{ *(CARD32 *)(dstaddr) = (srcvar); }
do { *(CARD32 *)(dstaddr) = (srcvar); } while (0)
typedef struct _XInternalAsync {