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

Clears 4 warnings from clang of the form:

ParseCmd.c:158:43: warning: empty expression statement has no effect;
 remove unnecessary ';' to silence this warning [-Wextra-semi-stmt]
                    PutCommandResource(options[i].value);
                                                        ^

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 12:37:53 -08:00
parent c0768ab687
commit 906bf4a86d

View file

@ -92,11 +92,11 @@ XrmParseCommand(
char **argend;
#define PutCommandResource(value_str) \
{ \
do { \
XrmStringToBindingQuarkList( \
options[i].specifier, start_bindings, start_quarks); \
XrmQPutStringResource(pdb, bindings, quarks, value_str); \
} /* PutCommandResource */
} while (0) /* PutCommandResource */
myargc = (*argc);
argend = argv + myargc;