mirror of
https://github.com/RTimothyEdwards/magic.git
synced 2026-09-02 02:58:01 +02:00
Fixed unused-parameters/unused-variables warnings
Added a ARG_UNUSED macro in utils/magic.h, which produces a simple cast to void to silence the warnings. The reasons this is used as opposed to an attribute is that most compilers should support this. Besides this, the macro can be easily searched for in the future to potentially remove (where possible) the unused parameters.
This commit is contained in:
+3
-5
@@ -182,7 +182,6 @@ areaCheck(tile, arg)
|
||||
|
||||
if (arg->dCD_radial != 0)
|
||||
{
|
||||
unsigned int i;
|
||||
int sqx, sqy;
|
||||
int sdist = arg->dCD_radial & 0xfff;
|
||||
long sstest, ssdist = (long) sdist * sdist;
|
||||
@@ -440,11 +439,11 @@ drcTile (tile, arg)
|
||||
Rect *rect = arg->dCD_rect; /* Area being checked */
|
||||
Rect errRect; /* Area checked for an individual rule */
|
||||
MaxRectsData *mrd; /* Used by widespacing rule */
|
||||
TileTypeBitMask tmpMask, *rMask;
|
||||
TileTypeBitMask tmpMask;
|
||||
bool trigpending; /* Hack for widespacing rule */
|
||||
bool firsttile;
|
||||
int triggered;
|
||||
int cdist, dist, ccdist, result;
|
||||
int cdist, dist, result;
|
||||
|
||||
arg->dCD_constraint = &errRect;
|
||||
|
||||
@@ -475,7 +474,6 @@ drcTile (tile, arg)
|
||||
|
||||
if (IsSplit(tile) && !SplitSide(tile))
|
||||
{
|
||||
int deltax, deltay;
|
||||
TileType tt, to;
|
||||
|
||||
tt = TiGetLeftType(tile); /* inside type */
|
||||
@@ -495,7 +493,7 @@ drcTile (tile, arg)
|
||||
{
|
||||
int deltax, deltay, w, h;
|
||||
double r;
|
||||
TileType dinfo, dsplit;
|
||||
TileType dinfo;
|
||||
|
||||
/* Work to be done: Handle triggering rules for non-Manhattan */
|
||||
/* edges; especially important for the wide-spacing rule. */
|
||||
|
||||
Reference in New Issue
Block a user