mirror of
https://gitlab.freedesktop.org/xorg/lib/libx11.git
synced 2026-05-06 13:58:03 +02:00
Data: add do ... while (0) to avoid -Wextra-semi-stmt warnings
Clears 38 warnings from clang of the form:
cmsLkCol.c:155:35: warning: empty expression statement has no effect;
remove unnecessary ';' to silence this warning [-Wextra-semi-stmt]
Data (dpy, colorname, (long)n);
^
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:
parent
9ab8f6a5f7
commit
4cb567d9a0
1 changed files with 2 additions and 2 deletions
|
|
@ -644,13 +644,13 @@ extern void _XFlushGCCache(Display *dpy, GC gc);
|
|||
* "len" is the length of the data buffer.
|
||||
*/
|
||||
#ifndef DataRoutineIsProcedure
|
||||
#define Data(dpy, data, len) {\
|
||||
#define Data(dpy, data, len) do {\
|
||||
if (dpy->bufptr + (len) <= dpy->bufmax) {\
|
||||
memcpy(dpy->bufptr, data, (size_t)(len));\
|
||||
dpy->bufptr += ((size_t)((len) + 3) & (size_t)~3);\
|
||||
} else\
|
||||
_XSend(dpy, (_Xconst char*)(data), (long)(len));\
|
||||
}
|
||||
} while (0)
|
||||
#endif /* DataRoutineIsProcedure */
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue