diff --git a/Common/GmshMessage.cpp b/Common/GmshMessage.cpp
index 4ca490c90e593fa7ce9edbfccc7fec2a65d2571d..7855de77cd3b13226430ff218df399c8a2a32436 100644
--- a/Common/GmshMessage.cpp
+++ b/Common/GmshMessage.cpp
@@ -1055,6 +1055,7 @@ int Msg::GetNumOnelabClients()
 #if defined(HAVE_ONELAB)
   return onelab::server::instance()->getNumClients();
 #endif
+  return 0;
 }
 
 #if defined(HAVE_ONELAB)