From 2c2cf93be1b53fa4ba3d4115f392b990d8eb3234 Mon Sep 17 00:00:00 2001 From: edzer Date: Wed, 29 Nov 2023 23:21:06 +0100 Subject: [PATCH] fix Rcpp -Wformat-security warning for howto, see https://github.com/RcppCore/Rcpp/issues/1287 --- src/RcppExports.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/RcppExports.cpp b/src/RcppExports.cpp index fbb6863e5..b3009549d 100644 --- a/src/RcppExports.cpp +++ b/src/RcppExports.cpp @@ -1352,7 +1352,7 @@ RcppExport SEXP _sf_CPL_read_wkb(SEXP wkb_listSEXP, SEXP EWKBSEXP, SEXP spatiali if (rcpp_isError_gen) { SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen); UNPROTECT(1); - Rf_error(CHAR(rcpp_msgSEXP_gen)); + Rf_error("%s", CHAR(rcpp_msgSEXP_gen)); } UNPROTECT(1); return rcpp_result_gen; @@ -1387,7 +1387,7 @@ RcppExport SEXP _sf_CPL_write_wkb(SEXP sfcSEXP, SEXP EWKBSEXP) { if (rcpp_isError_gen) { SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen); UNPROTECT(1); - Rf_error(CHAR(rcpp_msgSEXP_gen)); + Rf_error("%s", CHAR(rcpp_msgSEXP_gen)); } UNPROTECT(1); return rcpp_result_gen;