Skip to content

Commit 43c8d5d

Browse files
committed
Fix unused parameter warning [-Werror=unused-parameter]
1 parent e105c8f commit 43c8d5d

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

source/event_gpio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ int gpio_initial(unsigned int gpio)
471471
return 0;
472472
}
473473

474-
void *poll_thread(void *threadarg)
474+
void *poll_thread(__attribute__ ((unused)) void *threadarg)
475475
{
476476
struct epoll_event events;
477477
char buf;

source/py_gpio.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ static int init_module(void)
6161
}
6262

6363
// python function cleanup()
64-
static PyObject *py_cleanup(PyObject *self, PyObject *args)
64+
static PyObject *py_cleanup(__attribute__ ((unused)) PyObject *self, __attribute__ ((unused)) PyObject *args)
6565
{
6666
// clean up any exports
6767
event_cleanup();
@@ -70,7 +70,7 @@ static PyObject *py_cleanup(PyObject *self, PyObject *args)
7070
}
7171

7272
// python function setup(channel, direction, pull_up_down=PUD_OFF, initial=None, delay=0)
73-
static PyObject *py_setup_channel(PyObject *self, PyObject *args, PyObject *kwargs)
73+
static PyObject *py_setup_channel(__attribute__ ((unused)) PyObject *self, PyObject *args, PyObject *kwargs)
7474
{
7575
unsigned int gpio;
7676
char *channel;
@@ -151,7 +151,7 @@ static PyObject *py_setup_channel(PyObject *self, PyObject *args, PyObject *kwar
151151
}
152152

153153
// python function output(channel, value)
154-
static PyObject *py_output_gpio(PyObject *self, PyObject *args)
154+
static PyObject *py_output_gpio(__attribute__ ((unused)) PyObject *self, PyObject *args)
155155
{
156156
unsigned int gpio;
157157
int value;
@@ -177,7 +177,7 @@ static PyObject *py_output_gpio(PyObject *self, PyObject *args)
177177
}
178178

179179
// python function value = input(channel)
180-
static PyObject *py_input_gpio(PyObject *self, PyObject *args)
180+
static PyObject *py_input_gpio(__attribute__ ((unused)) PyObject *self, PyObject *args)
181181
{
182182
unsigned int gpio;
183183
char *channel;
@@ -276,7 +276,7 @@ static int add_py_callback(char *channel, unsigned int gpio, unsigned int bounce
276276
}
277277

278278
// python function add_event_callback(gpio, callback, bouncetime=0)
279-
static PyObject *py_add_event_callback(PyObject *self, PyObject *args, PyObject *kwargs)
279+
static PyObject *py_add_event_callback(__attribute__ ((unused)) PyObject *self, PyObject *args, PyObject *kwargs)
280280
{
281281
unsigned int gpio;
282282
char *channel;
@@ -318,7 +318,7 @@ static PyObject *py_add_event_callback(PyObject *self, PyObject *args, PyObject
318318
}
319319

320320
// python function add_event_detect(gpio, edge, callback=None, bouncetime=0
321-
static PyObject *py_add_event_detect(PyObject *self, PyObject *args, PyObject *kwargs)
321+
static PyObject *py_add_event_detect(__attribute__ ((unused)) PyObject *self, PyObject *args, PyObject *kwargs)
322322
{
323323
unsigned int gpio;
324324
char *channel;
@@ -375,7 +375,7 @@ static PyObject *py_add_event_detect(PyObject *self, PyObject *args, PyObject *k
375375
}
376376

377377
// python function remove_event_detect(gpio)
378-
static PyObject *py_remove_event_detect(PyObject *self, PyObject *args)
378+
static PyObject *py_remove_event_detect(__attribute__ ((unused)) PyObject *self, PyObject *args)
379379
{
380380
unsigned int gpio;
381381
char *channel;
@@ -416,7 +416,7 @@ static PyObject *py_remove_event_detect(PyObject *self, PyObject *args)
416416
}
417417

418418
// python function value = event_detected(channel)
419-
static PyObject *py_event_detected(PyObject *self, PyObject *args)
419+
static PyObject *py_event_detected(__attribute__ ((unused)) PyObject *self, PyObject *args)
420420
{
421421
unsigned int gpio;
422422
char *channel;
@@ -436,7 +436,7 @@ static PyObject *py_event_detected(PyObject *self, PyObject *args)
436436
}
437437

438438
// python function py_wait_for_edge(gpio, edge, timeout = -1)
439-
static PyObject *py_wait_for_edge(PyObject *self, PyObject *args)
439+
static PyObject *py_wait_for_edge(__attribute__ ((unused)) PyObject *self, PyObject *args)
440440
{
441441
unsigned int gpio;
442442
int edge, result, timeout;
@@ -490,7 +490,7 @@ static PyObject *py_wait_for_edge(PyObject *self, PyObject *args)
490490
}
491491

492492
// python function value = gpio_function(gpio)
493-
static PyObject *py_gpio_function(PyObject *self, PyObject *args)
493+
static PyObject *py_gpio_function(__attribute__ ((unused)) PyObject *self, PyObject *args)
494494
{
495495
unsigned int gpio;
496496
unsigned int value;
@@ -517,7 +517,7 @@ static PyObject *py_gpio_function(PyObject *self, PyObject *args)
517517
}
518518

519519
// python function setwarnings(state)
520-
static PyObject *py_setwarnings(PyObject *self, PyObject *args)
520+
static PyObject *py_setwarnings(__attribute__ ((unused)) PyObject *self, __attribute__ ((unused)) PyObject *args)
521521
{
522522
if (!PyArg_ParseTuple(args, "i", &gpio_warnings))
523523
return NULL;

0 commit comments

Comments
 (0)