aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2023-05-02 14:22:13 +0200
committerThomas White <taw@physics.org>2023-05-02 14:22:13 +0200
commit5c1373e53709bd59403716b497c8c6c94b9143c4 (patch)
tree1ba9eda7717f3a9656bf1300c47a71d47dffc031 /src
parent7260e3a2710296665dbceb427e447da38175513f (diff)
Avoid unused variable if compiled without HAVE_SCHED_SETAFFINITY
Diffstat (limited to 'src')
-rw-r--r--src/im-sandbox.c3
1 files changed, 1 insertions, 2 deletions
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);