kopia lustrzana https://gitlab.com/sane-project/backends
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
rodzic
e97112fa96
commit
b4ce719973
|
@ -524,8 +524,9 @@ static SANE_Status read_image_simplex(SANE_Handle handle)
|
||||||
return st;
|
return st;
|
||||||
}
|
}
|
||||||
|
|
||||||
static SANE_Status read_data(struct scanner *s)
|
static void * read_data (void *arg)
|
||||||
{
|
{
|
||||||
|
struct scanner *s = (struct scanner *) arg;
|
||||||
SANE_Status st;
|
SANE_Status st;
|
||||||
int duplex = s->val[DUPLEX].w;
|
int duplex = s->val[DUPLEX].w;
|
||||||
s->read = 0;
|
s->read = 0;
|
||||||
|
@ -549,7 +550,7 @@ static SANE_Status read_data(struct scanner *s)
|
||||||
return SANE_STATUS_GOOD;
|
return SANE_STATUS_GOOD;
|
||||||
err:
|
err:
|
||||||
s->scanning = 0;
|
s->scanning = 0;
|
||||||
return st;
|
return (void *) st;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Start scanning */
|
/* Start scanning */
|
||||||
|
@ -640,7 +641,7 @@ sane_start (SANE_Handle handle)
|
||||||
goto err;
|
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;
|
st = SANE_STATUS_IO_ERROR;
|
||||||
goto err;
|
goto err;
|
||||||
|
|
Ładowanie…
Reference in New Issue