diff --git a/src/spectral.cpp b/src/spectral.cpp index 2254a47..ad7bfc0 100644 --- a/src/spectral.cpp +++ b/src/spectral.cpp @@ -106,7 +106,7 @@ List spectral_dre(const arma::mat& dist_nu, for (int sig = 0; sig < nsigma; sig++) { if(Progress::check_abort()) { - if (progressbar) Rprintf("\n"); + if (progressbar) Rprintf("%s", "\n"); Rcpp::stop("User terminated execution."); R_FlushConsole(); } else { diff --git a/src/ulsif.cpp b/src/ulsif.cpp index 5526339..b9b55fa 100644 --- a/src/ulsif.cpp +++ b/src/ulsif.cpp @@ -90,7 +90,7 @@ List compute_ulsif(const arma::mat& dist_nu, const arma::mat& dist_de, const arm #else if (parallel) { std::string warn = "OpenMP is not available, parallel processing is disabled."; - Rf_warningcall(R_NilValue, warn.c_str()); + Rf_warningcall(R_NilValue, "%s", warn.c_str()); } #endif Progress p(nsigma * nlambda, progressbar); @@ -117,7 +117,7 @@ List compute_ulsif(const arma::mat& dist_nu, const arma::mat& dist_de, const arm } if (stopped) { if (progressbar) { - Rprintf("\n"); + Rprintf("%s", "\n"); } Rcpp::stop("User terminated execution."); R_FlushConsole();