From fa321c14d4206f8183fc9029ee9bd0d216ce700b Mon Sep 17 00:00:00 2001
From: Stephane Del Pino <stephane.delpino44@gmail.com>
Date: Sat, 22 Feb 2025 12:31:22 +0100
Subject: [PATCH] Fix missing return in SlurmWrapper

---
 src/utils/Stop.cpp | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/src/utils/Stop.cpp b/src/utils/Stop.cpp
index 189b42e07..fb2755c7d 100644
--- a/src/utils/Stop.cpp
+++ b/src/utils/Stop.cpp
@@ -13,19 +13,21 @@
 // LCOV_EXCL_START
 class SlurmWrapper
 {
-private:
+ private:
   int m_slurm_job_id = -1;
 
-public:
-  bool mustStop() const
+ public:
+  bool
+  mustStop() const
   {
     if (m_slurm_job_id == -1) {
-      false;
+      return false;
+
     } else {
       return slurm_get_rem_time(m_slurm_job_id) < 150;
     }
   }
-  
+
   SlurmWrapper()
   {
     char* env = getenv("SLURM_JOB_ID");
@@ -62,7 +64,7 @@ stop()
       stop = elapse_time > stop_file_age;
     }
 
-#ifdef PUGS_HAS_SLURM    
+#ifdef PUGS_HAS_SLURM
     // LCOV_EXCL_START
     static SlurmWrapper slurm_wrapper;
     if (slurm_wrapper.mustStop()) {
@@ -71,7 +73,6 @@ stop()
     // LCOV_EXCL_STOP
 #endif   // PUGS_HAS_SLURM
   }
-  
 
   parallel::broadcast(stop, 0);
 
-- 
GitLab