pixma: Fix [-Wint-conversion] and [-Wpedantic] compiler warnings

These are also related to the SANE_Pid type issues.
merge-requests/1/head
Olaf Meeuwissen 2017-07-15 17:11:06 +09:00
rodzic ddd7d821f6
commit 73861ea91c
1 zmienionych plików z 4 dodań i 3 usunięć

Wyświetl plik

@ -1094,7 +1094,7 @@ terminate_reader_task (pixma_sane_t * ss, int *exit_code)
pid = ss->reader_taskid;
if (!sanei_thread_is_valid (pid))
return -1;
return pid;
if (sanei_thread_is_forked ())
{
sanei_thread_kill (pid);
@ -1119,7 +1119,8 @@ terminate_reader_task (pixma_sane_t * ss, int *exit_code)
else
{
PDBG (pixma_dbg (1, "WARNING:waitpid() failed %s\n", strerror (errno)));
return -1;
sanei_thread_invalidate (pid);
return pid;
}
}
@ -1159,7 +1160,7 @@ start_reader_task (pixma_sane_t * ss)
if (is_forked)
{
pid = sanei_thread_begin (reader_process, ss);
if (pid > 0)
if (sanei_thread_is_valid (pid))
{
close (ss->wpipe);
ss->wpipe = -1;