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

Clears 12 warnings from clang of the form:

cmsCmap.c:194:34: warning: empty expression statement has no effect;
 remove unnecessary ';' to silence this warning [-Wextra-semi-stmt]
            DeqAsyncHandler(dpy, &async);
                                        ^

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 10:14:49 -08:00
parent 8703ecf105
commit 9ab8f6a5f7

View file

@ -804,12 +804,12 @@ typedef struct _XAsyncEState {
} _XAsyncErrorState;
extern void _XDeqAsyncHandler(Display *dpy, _XAsyncHandler *handler);
#define DeqAsyncHandler(dpy,handler) { \
#define DeqAsyncHandler(dpy,handler) do { \
if (dpy->async_handlers == (handler)) \
dpy->async_handlers = (handler)->next; \
else \
_XDeqAsyncHandler(dpy, handler); \
}
} while (0)
typedef void (*FreeFuncType) (
Display* /* display */