mzMain.c: warning: this 'else' clause does not guard...
Use of macro idiom: if(1) { ... } else
which has dangling else keyword to allow trailing semicolon at
use site, is not a good pattern.
Replaced with idiom: do { ... } while(0)
which should achieve the same purpose but now cause compile
error when used incorrectly at use site.
GCC14 -Wall cleanup series [-Wmisleading-indentation]
This commit is contained in:
parent
88d36bfd1e
commit
bd75ddf32c
|
|
@ -233,22 +233,22 @@ bool mzPathsDirty = FALSE;
|
|||
|
||||
/* macro for adding address pairs to translation table */
|
||||
#define ADDR_TBL_EQUIV(a1,a2) \
|
||||
if(TRUE) \
|
||||
do \
|
||||
{ \
|
||||
HashSetValue(HashFind(&aT, (char *) (a1)), (char *) (a2)); \
|
||||
HashSetValue(HashFind(&aT, (char *) (a2)), (char *) (a1)); \
|
||||
} else
|
||||
} while(0)
|
||||
|
||||
/* macro for translating address to address paired with it in address table */
|
||||
#define ADDR_TBL(type,a) \
|
||||
if (TRUE) \
|
||||
do \
|
||||
{ \
|
||||
HashEntry *he = HashLookOnly(&aT, (char *) (a)); \
|
||||
if(he) \
|
||||
{ \
|
||||
a = (type) HashGetValue(he); \
|
||||
} \
|
||||
} else
|
||||
} while(0)
|
||||
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in New Issue