Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust to -Wformat under R-devel #1285

Merged
merged 2 commits into from
Nov 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 9 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
2023-11-24 Dirk Eddelbuettel <edd@debian.org>

* DESCRIPTION (Version, Date): Roll micro version
* inst/include/Rcpp/config.h (RCPP_DEV_VERSION): Idem

* inst/include/Rcpp/iostream/Rstreambuf.h: Cast streamsize to int in
two spots
* inst/include/Rcpp/print.h (warningcall): Add missing '%s' format

2023-11-11 Dirk Eddelbuettel <edd@debian.org>

* vignettes/rmd/Rcpp-FAQ.Rmd: Updated and edited
Expand Down
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: Rcpp
Title: Seamless R and C++ Integration
Version: 1.0.11.3
Date: 2023-10-27
Version: 1.0.11.4
Date: 2023-11-24
Author: Dirk Eddelbuettel, Romain Francois, JJ Allaire, Kevin Ushey, Qiang Kou,
Nathan Russell, Inaki Ucar, Douglas Bates and John Chambers
Maintainer: Dirk Eddelbuettel <edd@debian.org>
Expand Down
4 changes: 2 additions & 2 deletions inst/include/Rcpp/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#define RCPP_VERSION_STRING "1.0.11"

// the current source snapshot (using four components, if a fifth is used in DESCRIPTION we ignore it)
#define RCPP_DEV_VERSION RcppDevVersion(1,0,11,3)
#define RCPP_DEV_VERSION_STRING "1.0.11.3"
#define RCPP_DEV_VERSION RcppDevVersion(1,0,11,4)
#define RCPP_DEV_VERSION_STRING "1.0.11.4"

#endif
7 changes: 3 additions & 4 deletions inst/include/Rcpp/iostream/Rstreambuf.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*-
//
// Rstreambuf.h: Rcpp R/C++ interface class library -- stream buffer
//
// Copyright (C) 2011 - 2020 Dirk Eddelbuettel, Romain Francois and Jelmer Ypma
// Copyright (C) 2021 Dirk Eddelbuettel, Romain Francois, Jelmer Ypma and Iñaki Ucar
// Copyright (C) 2021 - 2023 Dirk Eddelbuettel, Romain Francois, Jelmer Ypma and Iñaki Ucar
//
// This file is part of Rcpp.
//
Expand Down Expand Up @@ -50,11 +49,11 @@ namespace Rcpp {
};
// #nocov start
template <> inline std::streamsize Rstreambuf<true>::xsputn(const char *s, std::streamsize num) {
Rprintf("%.*s", num, s);
Rprintf("%.*s", static_cast<int>(num), s);
return num;
}
template <> inline std::streamsize Rstreambuf<false>::xsputn(const char *s, std::streamsize num) {
REprintf("%.*s", num, s);
REprintf("%.*s", static_cast<int>(num), s);
return num;
}

Expand Down
6 changes: 2 additions & 4 deletions inst/include/Rcpp/print.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*-
//
// Copyright (C) 2015 - 2016 Dirk Eddelbuettel
// Copyright (C) 2015 - 2023 Dirk Eddelbuettel
//
// This file is part of Rcpp.
//
Expand All @@ -27,12 +26,11 @@ inline void print(SEXP s) {
}

inline void warningcall(SEXP call, const std::string & s) {
Rf_warningcall(call, s.c_str());
Rf_warningcall(call, "%s", s.c_str());
}

// also note that warning() is defined in file exceptions.h

}

#endif