From ad1d86ecb308cbc2fdd4c9d5853ea9554d44a119 Mon Sep 17 00:00:00 2001 From: David Seifert Date: Fri, 27 Nov 2026 14:33:23 +0100 Subject: [PATCH] Fix `-Wunused-parameter` (Clang only) Unlike GCC, Clang warns about unused parameters in uninstantiated templates, breaking every TU that includes Rcpp under `-Wextra -Werror`. --- ChangeLog | 5 +++++ inst/include/Rcpp/internal/wrap.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index a421cdea2..d5ed15169 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2026-11-27 David Seifert + + * inst/include/Rcpp/internal/wrap.h: Comment out parameter to avoid + -Wunused-parameter warnings + 2026-11-23 Dirk Eddelbuettel * vignettes/rmd/Rcpp.bib: Correct misspelling of gitlab diff --git a/inst/include/Rcpp/internal/wrap.h b/inst/include/Rcpp/internal/wrap.h index 3c5251fa2..31967280f 100644 --- a/inst/include/Rcpp/internal/wrap.h +++ b/inst/include/Rcpp/internal/wrap.h @@ -523,7 +523,7 @@ namespace Rcpp { * quite a cryptic message */ template - inline SEXP wrap_dispatch_unknown_iterable(const T& object, ::Rcpp::traits::false_type) { + inline SEXP wrap_dispatch_unknown_iterable(const T& /*object*/, ::Rcpp::traits::false_type) { RCPP_DEBUG_1("wrap_dispatch_unknown_iterable<%s>(., false )", DEMANGLE(T)) // here we know that T is not convertible to SEXP static_assert(!sizeof(T), "cannot convert type to SEXP");