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

Clears 5 warnings from clang of the form:

RdBitF.c:141:32: warning: empty expression statement has no effect;
 remove unnecessary ';' to silence this warning [-Wextra-semi-stmt]
            RETURN (BitmapFileInvalid);
                                      ^

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 13:11:12 -08:00
parent 38c642c8eb
commit 6891228821

View file

@ -134,7 +134,7 @@ XReadBitmapFileData (
/* error cleanup and return macro */
#define RETURN(code) \
{ Xfree (bits); fclose (fstream); return code; }
do { Xfree (bits); fclose (fstream); return code; } while (0)
while (fgets(line, MAX_SIZE, fstream)) {
if (strlen(line) == MAX_SIZE-1)