diff --git a/dynare++/sylv/cc/SylvException.cpp b/dynare++/sylv/cc/SylvException.cpp
index 4671ef8c316223e730fa34b6e6409ff1029e2490..43206138cf129ce72760c06839a190993ea6af55 100644
--- a/dynare++/sylv/cc/SylvException.cpp
+++ b/dynare++/sylv/cc/SylvException.cpp
@@ -26,7 +26,7 @@ void SylvException::printMessage() const
 	char mes[1500];
 	mes[0] = '\0';
 	printMessage(mes, 1499);
-	printf(mes);
+	puts(mes);
 }
 
 int SylvException::printMessage(char* str, int maxlen) const
diff --git a/mex/sources/estimation/InitializeKalmanFilter.cc b/mex/sources/estimation/InitializeKalmanFilter.cc
index 34eb46b4c8aabbfd7c43434c5b8673ac0abeea1b..c409b23d0c85e2ee06ea4164ba1d411c59a615b2 100644
--- a/mex/sources/estimation/InitializeKalmanFilter.cc
+++ b/mex/sources/estimation/InitializeKalmanFilter.cc
@@ -113,14 +113,14 @@ InitializeKalmanFilter::setPstar(Matrix &Pstar, Matrix &Pinf, const Matrix &T, c
     {
       if (e.info > 0) // The matrix is not positive definite in NormCholesky calculator
         {
-          printf(e.message.c_str());
+          puts(e.message.c_str());
           info = -1; //likelihood = penalty;
           return;
         }
       else if (e.info < 0)
         {
           printf("Caugth unhandled TS exception with Pstar matrix: ");
-          printf(e.message.c_str());
+          puts(e.message.c_str());
           info = -1; //likelihood = penalty;
           throw;
         }