mirror of
https://gitlab.freedesktop.org/xorg/lib/libx11.git
synced 2026-05-09 07:18:06 +02:00
set_toupper: add do { ... } while (0) to avoid -Wextra-semi-stmt warnings
Clears 4 warnings from clang of the form:
lcUtil.c:53:18: warning: empty expression statement has no effect;
remove unnecessary ';' to silence this warning [-Wextra-semi-stmt]
set_toupper(ch1);
^
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
4cb567d9a0
commit
5e22c4b3d5
1 changed files with 3 additions and 2 deletions
|
|
@ -32,9 +32,10 @@
|
|||
|
||||
/* Don't use <ctype.h> here because it is locale dependent. */
|
||||
|
||||
#define set_toupper(ch) \
|
||||
#define set_toupper(ch) do { \
|
||||
if (ch >= 'a' && ch <= 'z') \
|
||||
ch = (unsigned char) (ch - 'a' + 'A');
|
||||
ch = (unsigned char) (ch - 'a' + 'A'); \
|
||||
} while (0)
|
||||
|
||||
/* Compares two ISO 8859-1 strings, ignoring case of ASCII letters.
|
||||
Like strcasecmp in an ASCII locale. */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue