mirror of
https://github.com/RTimothyEdwards/magic.git
synced 2026-08-31 18:25:50 +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:
+6
-3
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user