From 5c1373e53709bd59403716b497c8c6c94b9143c4 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Tue, 2 May 2023 14:22:13 +0200 Subject: Avoid unused variable if compiled without HAVE_SCHED_SETAFFINITY --- src/im-sandbox.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src') diff --git a/src/im-sandbox.c b/src/im-sandbox.c index e2f485b1..51d9db99 100644 --- a/src/im-sandbox.c +++ b/src/im-sandbox.c @@ -1171,7 +1171,6 @@ int create_sandbox(struct index_args *iargs, int n_proc, char *prefix, int r; int allDone = 0; struct get_pattern_ctx gpctx; - int n_cpus; if ( n_proc > MAX_NUM_WORKERS ) { ERROR("Number of workers (%i) is too large. Using %i\n", @@ -1180,7 +1179,7 @@ int create_sandbox(struct index_args *iargs, int n_proc, char *prefix, } #ifdef HAVE_SCHED_SETAFFINITY - n_cpus = get_nprocs(); + int n_cpus = get_nprocs(); if ( n_proc > n_cpus ) { ERROR("WARNING: Number of workers (%i) is larger than the " "number of available CPUs (%i)\n", n_proc, n_cpus); -- cgit v1.2.3