From 829960bc56f26af0b9293d7739ac0734846f663a Mon Sep 17 00:00:00 2001 From: David Anderson Date: Mon, 16 Dec 2024 12:16:24 -0800 Subject: [PATCH] scheduler: fix scrutinizer warnings --- sched/sched_score.cpp | 2 +- sched/sched_shmem.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/sched/sched_score.cpp b/sched/sched_score.cpp index e97d45c55b..a70282ada7 100644 --- a/sched/sched_score.cpp +++ b/sched/sched_score.cpp @@ -153,7 +153,7 @@ bool JOB::get_score(int array_index) { return true; } -bool job_compare(JOB j1, JOB j2) { +bool job_compare(JOB &j1, JOB &j2) { return (j1.score > j2.score); } diff --git a/sched/sched_shmem.cpp b/sched/sched_shmem.cpp index d5403f4bd6..bdf6bd89cf 100644 --- a/sched/sched_shmem.cpp +++ b/sched/sched_shmem.cpp @@ -117,6 +117,7 @@ void get_buda_plan_classes(vector &pcs) { strip_whitespace(buf); pcs.push_back(buf); } + boinc::fclose(f); } // scan various DB tables and populate shared-memory arrays