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:
Patrick Kurth
2025-10-10 22:12:19 +02:00
parent 27c423c2ed
commit ea03883829
183 changed files with 642 additions and 528 deletions
+3 -5
View File
@@ -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. */