The fix apparently is in the master branch. I did: remotes::install_github("RcppCore/Rcpp")
and the warnings went away. Don't forget to restart R, in case the previous version of Rcpp has already been loaded. Georgi Boshnakov ________________________________________ From: Rcpp-devel <rcpp-devel-boun...@lists.r-forge.r-project.org> on behalf of Iñaki Ucar <inaki.u...@uc3m.es> Sent: 28 November 2023 14:05 To: serguei.so...@gmail.com Cc: Rcpp-devel Subject: Re: [Rcpp-devel] Rf_error() format string See https://urldefense.com/v3/__https://github.com/RcppCore/Rcpp/pull/1288__;!!PDiH4ENfjr2_Jw!EFOOnpODjY8kqrYtd2kQYepR7zmvyr3eBy9xzfUdUGtRosBKJoz8N1MJcofoHAQzv3ZEzKkpyQWFu12_Sz3omFVkW8gDUfNfQg$ [github[.]com] Iñaki On Tue, 28 Nov 2023 at 14:49, Serguei Sokol <serguei.so...@gmail.com> wrote: > > Hi, > > I've got a request from CRAN to correct my package rmumps using Rcpp: > https://urldefense.com/v3/__https://cran.r-project.org/web/checks/check_results_rmumps.html__;!!PDiH4ENfjr2_Jw!EFOOnpODjY8kqrYtd2kQYepR7zmvyr3eBy9xzfUdUGtRosBKJoz8N1MJcofoHAQzv3ZEzKkpyQWFu12_Sz3omFVkW8hHt8kEWg$ > [cran[.]r-project[.]org] > > The problems come from RcppExports.cpp automatically generated lines like: > > Rf_error(CHAR(rcpp_msgSEXP_gen)); > > With a message saying: > > Found the following significant warnings: > RcppExports.cpp:58:18: warning: format string is not a string > literal (potentially insecure) [-Wformat-security] > ... > > The fix may be as trivial as: > > Rf_error("%s", CHAR(rcpp_msgSEXP_gen)); > > However, if I do it manually, it will be overwritten at the next > RcppExports.cppbuild. > Are there some plans to incorporate this fix in Rcpp? > Am I alone in this case? > > Best, > Serguei. > _______________________________________________ > Rcpp-devel mailing list > Rcpp-devel@lists.r-forge.r-project.org > https://urldefense.com/v3/__https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel__;!!PDiH4ENfjr2_Jw!EFOOnpODjY8kqrYtd2kQYepR7zmvyr3eBy9xzfUdUGtRosBKJoz8N1MJcofoHAQzv3ZEzKkpyQWFu12_Sz3omFVkW8hGFGjKcQ$ > [lists[.]r-forge[.]r-project[.]org] -- Iñaki Úcar Assistant Professor of Statistics Director of the Master in Computational Social Science Department of Statistics | Big Data Institute Universidad Carlos III de Madrid Av. de la Universidad 30, 28911 Leganés, Spain Office: 7.3.J25, Tel: +34 916248804 _______________________________________________ Rcpp-devel mailing list Rcpp-devel@lists.r-forge.r-project.org https://urldefense.com/v3/__https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel__;!!PDiH4ENfjr2_Jw!EFOOnpODjY8kqrYtd2kQYepR7zmvyr3eBy9xzfUdUGtRosBKJoz8N1MJcofoHAQzv3ZEzKkpyQWFu12_Sz3omFVkW8hGFGjKcQ$ [lists[.]r-forge[.]r-project[.]org] _______________________________________________ Rcpp-devel mailing list Rcpp-devel@lists.r-forge.r-project.org https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel