geofast.h: 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
e8f9b0af5e
commit
88d36bfd1e
|
|
@ -32,12 +32,12 @@
|
|||
*/
|
||||
|
||||
#define GEOCLIP(r, area) \
|
||||
if (1) { \
|
||||
do { \
|
||||
if ((r)->r_xbot < (area)->r_xbot) (r)->r_xbot = (area)->r_xbot; \
|
||||
if ((r)->r_ybot < (area)->r_ybot) (r)->r_ybot = (area)->r_ybot; \
|
||||
if ((r)->r_xtop > (area)->r_xtop) (r)->r_xtop = (area)->r_xtop; \
|
||||
if ((r)->r_ytop > (area)->r_ytop) (r)->r_ytop = (area)->r_ytop; \
|
||||
} else
|
||||
} while(0)
|
||||
|
||||
/* --------------------- Transforming rectangles ---------------------- */
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue