Skip to content

Commit 1f01bd3

Browse files
committed
tslib.c: explicitely mark unused parameters as such
This is for the compiler, and also a reminder for us, to check if we *could* make use of them.
1 parent 65fa2b3 commit 1f01bd3

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

src/tslib.c

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,9 @@ static int xf86TslibControlProc(DeviceIntPtr device, int what)
322322
}
323323

324324
static void
325-
xf86TslibUninit(InputDriverPtr drv, InputInfoPtr pInfo, int flags)
325+
xf86TslibUninit(__attribute__ ((unused)) InputDriverPtr drv,
326+
InputInfoPtr pInfo,
327+
__attribute__ ((unused)) int flags)
326328
{
327329
struct ts_priv *priv = (struct ts_priv *)(pInfo->private);
328330
#ifdef DEBUG
@@ -358,11 +360,12 @@ xf86TslibUninit(InputDriverPtr drv, InputInfoPtr pInfo, int flags)
358360
# define ABS_CNT (ABS_MAX+1)
359361
#endif
360362

361-
static int xf86TslibInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags)
363+
static int xf86TslibInit(__attribute__ ((unused)) InputDriverPtr drv,
364+
InputInfoPtr pInfo,
365+
__attribute__ ((unused)) int flags)
362366
{
363367
struct ts_priv *priv;
364368
char *s;
365-
int i;
366369
struct input_absinfo absinfo;
367370
#ifdef TSLIB_VERSION_MT
368371
struct ts_lib_version_data *ver = ts_libversion();
@@ -437,6 +440,8 @@ static int xf86TslibInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags)
437440
}
438441

439442
#ifdef TSLIB_VERSION_MT
443+
int i;
444+
440445
priv->samp_mt = malloc(priv->slots * sizeof(struct ts_sample_mt *));
441446
if (!priv->samp_mt)
442447
return BadValue;
@@ -523,8 +528,10 @@ _X_EXPORT InputDriverRec TSLIB = {
523528
#endif
524529
};
525530

526-
static pointer xf86TslibPlug(pointer module, pointer options, int *errmaj,
527-
int *errmin)
531+
static pointer xf86TslibPlug(pointer module,
532+
__attribute__ ((unused)) pointer options,
533+
__attribute__ ((unused)) int *errmaj,
534+
__attribute__ ((unused)) int *errmin)
528535
{
529536
xf86AddInputDriver(&TSLIB, module, 0);
530537
return module;

0 commit comments

Comments
 (0)