Skip to content

Commit

Permalink
Update RcppExports.cpp to avoid R-devel nag from -Wformat-securuty
Browse files Browse the repository at this point in the history
  • Loading branch information
eddelbuettel committed Nov 29, 2023
1 parent 36dc1f3 commit 6246503
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Get Script
run: curl -OLs https://eddelbuettel.github.io/r-ci/run.sh && chmod 0755 run.sh
Expand Down
8 changes: 8 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
2023-11-28 Dirk Eddelbuettel <[email protected]>

* src/RcppExports.cpp: Regenerated under updated Rcpp to address
format string issue reported by R-devel
* R/RcppExports.R: Idem

* .github/workflows/ci.yaml (jobs): Update to actions/checkout@v4

2022-11-18 Dirk Eddelbuettel <[email protected]>

* .github/workflows/ci.yaml (jobs): Update to actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion R/RcppExports.R
Original file line number Diff line number Diff line change
Expand Up @@ -183,5 +183,5 @@ getBusinessDays <- function(from, to) {

# Register entry points for exported C++ functions
methods::setLoadAction(function(ns) {
.Call('_RcppQuantuccia_RcppExport_registerCCallable', PACKAGE = 'RcppQuantuccia')
.Call(`_RcppQuantuccia_RcppExport_registerCCallable`)
})
28 changes: 14 additions & 14 deletions src/RcppExports.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ RcppExport SEXP _RcppQuantuccia_setCalendar(SEXP calstrSEXP) {
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;
Expand Down Expand Up @@ -75,7 +75,7 @@ RcppExport SEXP _RcppQuantuccia_getName() {
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;
Expand Down Expand Up @@ -108,7 +108,7 @@ RcppExport SEXP _RcppQuantuccia_getId() {
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;
Expand Down Expand Up @@ -143,7 +143,7 @@ RcppExport SEXP _RcppQuantuccia_advanceDate(SEXP rdSEXP, SEXP daysSEXP) {
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;
Expand Down Expand Up @@ -177,7 +177,7 @@ RcppExport SEXP _RcppQuantuccia_isBusinessDay(SEXP datesSEXP) {
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;
Expand Down Expand Up @@ -211,7 +211,7 @@ RcppExport SEXP _RcppQuantuccia_isHoliday(SEXP datesSEXP) {
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;
Expand Down Expand Up @@ -245,7 +245,7 @@ RcppExport SEXP _RcppQuantuccia_isWeekend(SEXP datesSEXP) {
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;
Expand Down Expand Up @@ -279,7 +279,7 @@ RcppExport SEXP _RcppQuantuccia_isEndOfMonth(SEXP datesSEXP) {
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;
Expand Down Expand Up @@ -313,7 +313,7 @@ RcppExport SEXP _RcppQuantuccia_getEndOfMonth(SEXP datesSEXP) {
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;
Expand Down Expand Up @@ -348,7 +348,7 @@ RcppExport SEXP _RcppQuantuccia_adjust_cpp(SEXP datesSEXP, SEXP bdcSEXP) {
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;
Expand Down Expand Up @@ -386,7 +386,7 @@ RcppExport SEXP _RcppQuantuccia_advanceUnits_cpp(SEXP datesSEXP, SEXP nSEXP, SEX
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;
Expand Down Expand Up @@ -423,7 +423,7 @@ RcppExport SEXP _RcppQuantuccia_businessDaysBetween(SEXP fromSEXP, SEXP toSEXP,
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;
Expand Down Expand Up @@ -459,7 +459,7 @@ RcppExport SEXP _RcppQuantuccia_getHolidays(SEXP fromSEXP, SEXP toSEXP, SEXP inc
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;
Expand Down Expand Up @@ -494,7 +494,7 @@ RcppExport SEXP _RcppQuantuccia_getBusinessDays(SEXP fromSEXP, SEXP toSEXP) {
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;
Expand Down

0 comments on commit 6246503

Please sign in to comment.