diff --git a/Common/GmshMessage.cpp b/Common/GmshMessage.cpp
index d9283f963e6b3242f99011dd374a85e4ad87b74d..d700ef9e09c74bf8f47edd6800f928f30e1732e7 100644
--- a/Common/GmshMessage.cpp
+++ b/Common/GmshMessage.cpp
@@ -911,8 +911,8 @@ std::string Msg::GetOnelabAction()
     _onelabClient->get(ps, _onelabClient->getName() + "/Action");
     if(ps.size()) return ps[0].getValue();
   }
-  return "";
 #endif
+  return "";
 }
 
 void Msg::LoadOnelabClient(const std::string &clientName, const std::string &sockName)