[Rcpp-devel] Compiler [-Wunused-variable] warnings.

Robi Ragan robi.ragan at sjsu.edu
Thu May 12 22:56:31 CEST 2016


On compilation I am getting lots of warnings that I would love to resolve. There are 30 or so but they all more or less look like the first three ill paste here:


> ==> R CMD INSTALL --preclean --no-multiarch --with-keep.source voteR
> 
> * installing to library ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library’
> * installing *source* package ‘voteR’ ...
> ** libs
> clang++ -std=c++11 -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I../inst/include -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -I"/Library/Frameworks/R.framework/Versions/3.3/Resources/library/Rcpp/include" -I"/Library/Frameworks/R.framework/Versions/3.3/Resources/library/BH/include"   -fPIC  -Wall -mtune=core2 -g -O2 -c RcppExports.cpp -o RcppExports.o
> RcppExports.cpp:14:1: warning: unused variable 'rcpp_output_type' [-Wunused-variable]
> BEGIN_RCPP
> ^
> /Library/Frameworks/R.framework/Versions/3.3/Resources/library/Rcpp/include/Rcpp/macros/macros.h:31:9: note: expanded from macro 'BEGIN_RCPP'
>     int rcpp_output_type = 0 ;                                                                   \
>         ^
> RcppExports.cpp:14:1: warning: unused variable 'rcpp_output_condition' [-Wunused-variable]
> /Library/Frameworks/R.framework/Versions/3.3/Resources/library/Rcpp/include/Rcpp/macros/macros.h:32:10: note: expanded from macro 'BEGIN_RCPP'
>     SEXP rcpp_output_condition = R_NilValue ;                                                    \
>          ^
> RcppExports.cpp:49:1: warning: unused variable 'rcpp_output_type' [-Wunused-variable]
> BEGIN_RCPP
> ^
> /Library/Frameworks/R.framework/Versions/3.3/Resources/library/Rcpp/include/Rcpp/macros/macros.h:31:9: note: expanded from macro 'BEGIN_RCPP'
>     int rcpp_output_type = 0 ;                                                                   \
>         ^


I tried searching all the relevant places for the past week or so and came up with no suggestions I could get to work. IF anyone can point me in the right direction I would appreciate it. If more of the output is needed I can provide it, I just wanted to keep the message as short as possible.


Thanks, 


Robi Ragan
Assistant Professor of Economics
College of Social Sciences
San Jose State University
http://www.robiragan.org


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20160512/9e201668/attachment.html>


More information about the Rcpp-devel mailing list