diff --git a/catalogue/OracleCatalogue.cpp b/catalogue/OracleCatalogue.cpp
index fced1b8604c8df34173f53a6b26763e495dde93d..17f456def9a77954583d252551322250305d4252 100644
--- a/catalogue/OracleCatalogue.cpp
+++ b/catalogue/OracleCatalogue.cpp
@@ -310,7 +310,7 @@ void OracleCatalogue::filesWrittenToTape(const std::set<TapeItemWrittenPointer>
     // allow checking fSeq coherency.
     // determine the number of files
     size_t filesCount=std::count_if(events.cbegin(), events.cend(), 
-        [](const TapeItemWrittenPointer &e){return typeid(*e)==typeid(TapeFileWritten);});
+        [](const TapeItemWrittenPointer &e) -> bool {return typeid(*e)==typeid(TapeFileWritten);});
     TapeFileBatch tapeFileBatch(filesCount);
     
     std::set<TapeFileWritten> fileEvents;
diff --git a/catalogue/PostgresCatalogue.cpp b/catalogue/PostgresCatalogue.cpp
index 3a4579d2ad1e716303d2511b38e6c29e18414899..f9d7bc49096843cc330c8680d345976f42daf057 100644
--- a/catalogue/PostgresCatalogue.cpp
+++ b/catalogue/PostgresCatalogue.cpp
@@ -291,7 +291,7 @@ void PostgresCatalogue::filesWrittenToTape(const std::set<TapeItemWrittenPointer
     // allow checking fSeq coherency.
     // determine the number of files
     size_t filesCount=std::count_if(events.cbegin(), events.cend(), 
-        [](const TapeItemWrittenPointer &e){return typeid(*e)==typeid(TapeFileWritten);});
+        [](const TapeItemWrittenPointer &e) -> bool {return typeid(*e)==typeid(TapeFileWritten);});
     TapeFileBatch tapeFileBatch(filesCount);
     
     std::set<TapeFileWritten> fileEvents;