Skip to content

Commit 776bf93

Browse files
committed
Fix -Wsign-compare warning
1 parent ad669c5 commit 776bf93

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎evdev/input.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ device_read(PyObject *self, PyObject *args)
7878
static PyObject *
7979
device_read_many(PyObject *self, PyObject *args)
8080
{
81-
int fd, i;
81+
int fd;
8282

8383
// get device file descriptor (O_RDONLY|O_NONBLOCK)
8484
int ret = PyArg_ParseTuple(args, "i", &fd);
@@ -101,7 +101,7 @@ device_read_many(PyObject *self, PyObject *args)
101101
}
102102

103103
// Construct a list of event tuples, which we'll make sense of in Python
104-
for (i = 0 ; i < nread/event_size ; i++) {
104+
for (unsigned i = 0 ; i < nread/event_size ; i++) {
105105
sec = PyLong_FromLong(event[i].time.tv_sec);
106106
usec = PyLong_FromLong(event[i].time.tv_usec);
107107
val = PyLong_FromLong(event[i].value);

0 commit comments

Comments
 (0)