From 8e0e63519069bed43b3bf1ce1f11fd0cd516d3e4 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Sun, 12 Feb 2023 10:51:46 -0800 Subject: 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 --- src/create.c | 4 ++-- 1 file 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]; -- cgit v1.2.1