From: Stefan Metzmacher Date: Tue, 31 Jul 2018 07:40:20 +0000 (+0200) Subject: pthreadpool: ignore the return value of poll(NULL, 0UL, 1) X-Git-Tag: ldb-1.5.0~74 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6da0d68f49bbd82f5a08427779c9f5ebd6f755aa;p=thirdparty%2Fsamba.git pthreadpool: ignore the return value of poll(NULL, 0UL, 1) Otherwise Coverity reports this: CID 1438160: (CHECKED_RETURN) Calling "poll(NULL, 0UL, 1)" without checking return value. This library function may fail and return an error code. Signed-off-by: Stefan Metzmacher Reviewed-by: Volker Lendecke --- diff --git a/lib/pthreadpool/pthreadpool_tevent.c b/lib/pthreadpool/pthreadpool_tevent.c index b4a9786f231..7088202d97c 100644 --- a/lib/pthreadpool/pthreadpool_tevent.c +++ b/lib/pthreadpool/pthreadpool_tevent.c @@ -873,7 +873,7 @@ static void pthreadpool_tevent_job_orphan(struct pthreadpool_tevent_job *job) */ PTHREAD_TEVENT_JOB_THREAD_FENCE(job); while (job->needs_fence.wrapper) { - poll(NULL, 0, 1); + (void)poll(NULL, 0, 1); PTHREAD_TEVENT_JOB_THREAD_FENCE(job); } job->wrapper = NULL; @@ -903,7 +903,7 @@ static void pthreadpool_tevent_job_orphan(struct pthreadpool_tevent_job *job) if (job->needs_fence.signaled) { break; } - poll(NULL, 0, 1); + (void)poll(NULL, 0, 1); PTHREAD_TEVENT_JOB_THREAD_FENCE(job); }