diff --git a/Geo/GModelIO_OCC.h b/Geo/GModelIO_OCC.h
index 8e649afbbd0ab165245b94c028f1a6c2647d0d8a..78659be2fd8661fe3d0c75972b94f2d8b4340f2e 100644
--- a/Geo/GModelIO_OCC.h
+++ b/Geo/GModelIO_OCC.h
@@ -598,7 +598,7 @@ public:
   }
   void removeAllDuplicates()
   {
-    return _error("remove all duplicates");
+    _error("remove all duplicates");
   }
   bool mergeVertices(const std::vector<int> &tags)
   {