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
+6 -3
View File
@@ -104,8 +104,8 @@ drcArrayFunc(scx, arg)
{
int xsep, ysep;
int xsize, ysize;
int rval, oldTiles;
Rect errorArea, yankArea, tmp, tmp2, saveClip;
int oldTiles;
Rect errorArea, yankArea, tmp, tmp2;
DRCCookie *save_cptr;
CellUse *use = scx->scx_use;
Rect *area;
@@ -113,7 +113,6 @@ drcArrayFunc(scx, arg)
void (*drcArrayErrorFunc)(); /* Function to call on violations. */
ClientData drcArrayClientData; /* Extra parameter to pass to func. */
PaintResultType (*savedPaintTable)[NT][NT];
PaintResultType (*savedEraseTable)[NT][NT];
int (*savedPaintPlane)();
if ((use->cu_xlo == use->cu_xhi) && (use->cu_ylo == use->cu_yhi))
@@ -291,6 +290,8 @@ drcArrayYankFunc(use, transform, x, y, yankArea)
Rect *yankArea; /* Area to yank (in parent coords). */
{
ARG_UNUSED(x);
ARG_UNUSED(y);
SearchContext scx;
Transform tinv;
@@ -332,6 +333,8 @@ drcArrayOverlapFunc(use, transform, x, y, arg)
* checking. See drcExactOverlapTile.
*/
{
ARG_UNUSED(x);
ARG_UNUSED(y);
Transform tinv;
SearchContext scx;