[Rcpp-commits] r2933 - in pkg/Rcpp: . inst/include/Rcpp/module

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sat Apr 2 19:05:46 CEST 2011


Author: edd
Date: 2011-04-02 19:05:45 +0200 (Sat, 02 Apr 2011)
New Revision: 2933

Modified:
   pkg/Rcpp/ChangeLog
   pkg/Rcpp/inst/include/Rcpp/module/Module_generated_ctor_signature.h
Log:
suppress a 'unused parameter' warning on (non-templated) ctor_signature()


Modified: pkg/Rcpp/ChangeLog
===================================================================
--- pkg/Rcpp/ChangeLog	2011-04-02 03:18:48 UTC (rev 2932)
+++ pkg/Rcpp/ChangeLog	2011-04-02 17:05:45 UTC (rev 2933)
@@ -1,3 +1,9 @@
+2011-04-02  Dirk Eddelbuettel  <edd at debian.org>
+
+	* inst/include/Rcpp/module/Module_generated_ctor_signatureh: Add a
+	bit of null-op code to suppress a 'unused parameter' warning in the
+	initial (and non-templated) ctor_signature() function
+
 2011-03-21  Dirk Eddelbuettel  <edd at debian.org>
 
 	* inst/unitTests/testRcppModule/src/stdVector.cpp: Protect push_back

Modified: pkg/Rcpp/inst/include/Rcpp/module/Module_generated_ctor_signature.h
===================================================================
--- pkg/Rcpp/inst/include/Rcpp/module/Module_generated_ctor_signature.h	2011-04-02 03:18:48 UTC (rev 2932)
+++ pkg/Rcpp/inst/include/Rcpp/module/Module_generated_ctor_signature.h	2011-04-02 17:05:45 UTC (rev 2933)
@@ -25,6 +25,10 @@
 inline void ctor_signature( std::string& s, const std::string& classname ){
     s.clear() ;
     s+= "()" ; 
+    if (0 > 1) { // silences 'unused paramater' warning from g++
+       std::string foo = classname;
+       foo.clear();
+    }
 }
 
 template <typename U0>



More information about the Rcpp-commits mailing list