kvs40xx: Fix [-Wcast-function-type] compiler warning. Re #120

The changes are meant to make explicit what the run-time or compiler
is thought to be doing anyway.
merge-requests/213/head
Olaf Meeuwissen 2019-10-30 20:28:33 +09:00
rodzic e97112fa96
commit b4ce719973
1 zmienionych plików z 5 dodań i 4 usunięć

Wyświetl plik

@ -524,9 +524,10 @@ static SANE_Status read_image_simplex(SANE_Handle handle)
return st;
}
static SANE_Status read_data(struct scanner *s)
static void * read_data (void *arg)
{
SANE_Status st;
struct scanner *s = (struct scanner *) arg;
SANE_Status st;
int duplex = s->val[DUPLEX].w;
s->read = 0;
s->side = SIDE_FRONT;
@ -549,7 +550,7 @@ static SANE_Status read_data(struct scanner *s)
return SANE_STATUS_GOOD;
err:
s->scanning = 0;
return st;
return (void *) st;
}
/* Start scanning */
@ -640,7 +641,7 @@ sane_start (SANE_Handle handle)
goto err;
}
if (pthread_create (&s->thread, NULL, (void *(*)(void *)) read_data, s))
if (pthread_create (&s->thread, NULL, read_data, s))
{
st = SANE_STATUS_IO_ERROR;
goto err;