From fde2782ecbb95043c9640f53682d128713542c49 Mon Sep 17 00:00:00 2001 From: Pascal Massimino Date: Sun, 5 Nov 2017 16:39:29 -0800 Subject: [PATCH] thread_utils: fix potentially bad call to Execute We must use the Interface, and avoid fwd decl. Change-Id: I18d77a009a29921b6e3694de4df494952b11a83f --- src/utils/thread_utils.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/utils/thread_utils.c b/src/utils/thread_utils.c index 2ab2d148..c6ef3cb4 100644 --- a/src/utils/thread_utils.c +++ b/src/utils/thread_utils.c @@ -201,8 +201,6 @@ static int pthread_cond_wait(pthread_cond_t* const condition, //------------------------------------------------------------------------------ -static void Execute(WebPWorker* const worker); // Forward declaration. - static THREADFN ThreadLoop(void* ptr) { WebPWorker* const worker = (WebPWorker*)ptr; int done = 0; @@ -212,7 +210,7 @@ static THREADFN ThreadLoop(void* ptr) { pthread_cond_wait(&worker->impl_->condition_, &worker->impl_->mutex_); } if (worker->status_ == WORK) { - Execute(worker); + WebPGetWorkerInterface()->Execute(worker); worker->status_ = OK; } else if (worker->status_ == NOT_OK) { // finish the worker done = 1;