First make exit_work_queue static so that it's file scope is honored by the compiler (it uses a file scope structure as a parameter). Second compile it out by default unless the compile flag COMPILE_UNUSED_CODE is defined. Signed-off-by: Steven Dake <sdake at redhat.com> --- sheep/work.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/sheep/work.c b/sheep/work.c index bb67750..8016435 100644 --- a/sheep/work.c +++ b/sheep/work.c @@ -334,7 +334,8 @@ destroy_threads: return -1; } -void exit_work_queue(struct work_queue *q) +#ifdef COMPILE_UNUSED_CODE +static void exit_work_queue(struct work_queue *q) { int i; struct worker_info *wi = container_of(q, struct worker_info, q); @@ -351,3 +352,4 @@ void exit_work_queue(struct work_queue *q) pthread_mutex_destroy(&wi->startup_lock); pthread_mutex_destroy(&wi->finished_lock); } +#endif -- 1.6.2.5 |