Skip to content

Commit b90ab65

Browse files
authored
Adjust to -Wformat under R-devel (#1285)
* Adjust two format strings for new r-devel warning * Roll micro version
1 parent e52bd46 commit b90ab65

File tree

5 files changed

+18
-12
lines changed

5 files changed

+18
-12
lines changed

ChangeLog

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
2023-11-24 Dirk Eddelbuettel <[email protected]>
2+
3+
* DESCRIPTION (Version, Date): Roll micro version
4+
* inst/include/Rcpp/config.h (RCPP_DEV_VERSION): Idem
5+
6+
* inst/include/Rcpp/iostream/Rstreambuf.h: Cast streamsize to int in
7+
two spots
8+
* inst/include/Rcpp/print.h (warningcall): Add missing '%s' format
9+
110
2023-11-11 Dirk Eddelbuettel <[email protected]>
211

312
* vignettes/rmd/Rcpp-FAQ.Rmd: Updated and edited

DESCRIPTION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: Rcpp
22
Title: Seamless R and C++ Integration
3-
Version: 1.0.11.3
4-
Date: 2023-10-27
3+
Version: 1.0.11.4
4+
Date: 2023-11-24
55
Author: Dirk Eddelbuettel, Romain Francois, JJ Allaire, Kevin Ushey, Qiang Kou,
66
Nathan Russell, Inaki Ucar, Douglas Bates and John Chambers
77
Maintainer: Dirk Eddelbuettel <[email protected]>

inst/include/Rcpp/config.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
#define RCPP_VERSION_STRING "1.0.11"
3131

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

3636
#endif

inst/include/Rcpp/iostream/Rstreambuf.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*-
21
//
32
// Rstreambuf.h: Rcpp R/C++ interface class library -- stream buffer
43
//
54
// Copyright (C) 2011 - 2020 Dirk Eddelbuettel, Romain Francois and Jelmer Ypma
6-
// Copyright (C) 2021 Dirk Eddelbuettel, Romain Francois, Jelmer Ypma and Iñaki Ucar
5+
// Copyright (C) 2021 - 2023 Dirk Eddelbuettel, Romain Francois, Jelmer Ypma and Iñaki Ucar
76
//
87
// This file is part of Rcpp.
98
//
@@ -50,11 +49,11 @@ namespace Rcpp {
5049
};
5150
// #nocov start
5251
template <> inline std::streamsize Rstreambuf<true>::xsputn(const char *s, std::streamsize num) {
53-
Rprintf("%.*s", num, s);
52+
Rprintf("%.*s", static_cast<int>(num), s);
5453
return num;
5554
}
5655
template <> inline std::streamsize Rstreambuf<false>::xsputn(const char *s, std::streamsize num) {
57-
REprintf("%.*s", num, s);
56+
REprintf("%.*s", static_cast<int>(num), s);
5857
return num;
5958
}
6059

inst/include/Rcpp/print.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*-
21
//
3-
// Copyright (C) 2015 - 2016 Dirk Eddelbuettel
2+
// Copyright (C) 2015 - 2023 Dirk Eddelbuettel
43
//
54
// This file is part of Rcpp.
65
//
@@ -27,12 +26,11 @@ inline void print(SEXP s) {
2726
}
2827

2928
inline void warningcall(SEXP call, const std::string & s) {
30-
Rf_warningcall(call, s.c_str());
29+
Rf_warningcall(call, "%s", s.c_str());
3130
}
3231

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

3534
}
3635

3736
#endif
38-

0 commit comments

Comments
 (0)