diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2023-02-12 10:51:46 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2023-02-12 10:51:46 -0800 |
commit | 8e0e63519069bed43b3bf1ce1f11fd0cd516d3e4 (patch) | |
tree | c969d5854cd2adf5e4617f6155be6aca66d1ae46 | |
parent | 25616112983cd3f8bfe5379771b5bfd63b3c3621 (diff) |
parse.c: Wrap FREE_CIDX definition in do { ... } while(0)
Makes it match the definition in create.c and eliminates
clang warnings:
create.c:2409:13: warning: empty expression statement has no effect;
remove unnecessary ';' to silence this warning [-Wextra-semi-stmt]
FREE_CIDX;
^
create.c:2440:17: warning: empty expression statement has no effect;
remove unnecessary ';' to silence this warning [-Wextra-semi-stmt]
FREE_CIDX;
^
create.c:2444:13: warning: empty expression statement has no effect;
remove unnecessary ';' to silence this warning [-Wextra-semi-stmt]
FREE_CIDX;
^
create.c:2449:15: warning: empty expression statement has no effect;
remove unnecessary ';' to silence this warning [-Wextra-semi-stmt]
FREE_CIDX;
^
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r-- | src/create.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/create.c b/src/create.c index f92ffef..4921c7d 100644 --- a/src/create.c +++ b/src/create.c @@ -2392,8 +2392,8 @@ ParseAndPutPixels( { /* free all allocated pointers at all exits */ -#define FREE_CIDX {int f; for (f = 0; f < 256; f++) \ -if (cidx[f]) XpmFree(cidx[f]);} +#define FREE_CIDX do {int f; for (f = 0; f < 256; f++) \ +if (cidx[f]) XpmFree(cidx[f]);} while(0) /* array of pointers malloced by need */ unsigned short *cidx[256]; |