I created an R package using RcppArmadillo from my Mac, and then built and installed it by doing the following:
Rcpp::compileAttributes()
devtools::build()
devtools::install()
However, I received several same warnings as below:
clang++ -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/Rcpp/include" -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/RcppArmadillo/include" -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fopenmp -fPIC -Wall -g -O2 -c RcppExports.cpp -o RcppExports.o
In file included from RcppExports.cpp:4:
In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/RcppArmadillo/include/RcppArmadillo.h:34:
In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/Rcpp/include/Rcpp.h:57:
/Library/Frameworks/R.framework/Versions/3.6/Resources/library/Rcpp/include/Rcpp/DataFrame.h:136:18: warning: unused variable 'data' [-Wunused-variable]
SEXP data = Parent::get__();
^
1 warning generated.
The package works fine although there are warnings during installation. Does anyone know how I can get rid of these warnings?
(I tried the answer here: Wunused-variable errors in Rcpp, but I still got the warnings.)