RobinHankin / hyper2

https://robinhankin.github.io/hyper2/
5 stars 3 forks source link

compiler warning from winbuilder #151

Closed RobinHankin closed 2 years ago

RobinHankin commented 2 years ago
g++ -std=gnu++11  -I"D:/RCompile/recent/R-4.2.1/include" -DNDEBUG  -I'D:/RCompile/CRANpkg/lib/4.2/Rcpp/include'   -I"d:/rtools42/x86_64-w64-mingw32.static.posix/include"     -pedantic -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c hyperdirichlet2.cpp -o hyperdirichlet2.o
g++ -std=gnu++11  -I"D:/RCompile/recent/R-4.2.1/include" -DNDEBUG  -I'D:/RCompile/CRANpkg/lib/4.2/Rcpp/include'   -I"d:/rtools42/x86_64-w64-mingw32.static.posix/include"     -pedantic -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c hyperdirichlet3.cpp -o hyperdirichlet3.o
hyperdirichlet3.cpp: In function 'weightedplayervector makeweightedplayervector3(Rcpp::CharacterVector, Rcpp::NumericVector)':
hyperdirichlet3.cpp:8:23: warning: comparison of integer expressions of different signedness: 'size_t' {aka 'long long unsigned int'} and 'R_xlen_t' {aka 'long long int'} [-Wsign-compare]
    8 |     for(size_t i=0 ; i<players.size() ; i++){
      |                      ~^~~~~~~~~~~~~~~

hyperdirichlet3.cpp: In function 'playerstrengths preparepmap3(const NumericVector&, const CharacterVector&)':
hyperdirichlet3.cpp:36:22: warning: comparison of integer expressions of different signedness: 'size_t' {aka 'long long unsigned int'} and 'R_xlen_t' {aka 'long long int'} [-Wsign-compare]
   36 |     for(size_t i=0; i<probs.length() ; i++){
      |                     ~^~~~~~~~~~~~~~~
hyperdirichlet3.cpp: In function 'Rcpp::List accessor3(Rcpp::List, Rcpp::List, Rcpp::NumericVector, Rcpp::List, Rcpp::List)':
hyperdirichlet3.cpp:166:22: warning: comparison of integer expressions of different signedness: 'size_t' {aka 'long long unsigned int'} and 'const int' [-Wsign-compare]
  166 |     for(size_t i=0; i<n ; i++){
      |                     ~^~
g++ -std=gnu++11 -shared -s -static-libgcc -o hyper2.dll tmp.def RcppExports.o hyper2_init.o hyperdirichlet2.o hyperdirichlet3.o -Ld:/rtools42/x86_64-w64-mingw32.static.posix/lib/x64 -Ld:/rtools42/x86_64-w64-mingw32.static.posix/lib -LD:/RCompile/recent/R-4.2.1/bin/x64 -lR
installing to d:/RCompile/CRANguest/R-release/lib/00LOCK-hyper2/00new/hyper2/libs/x64
** R
** data
*** moving datasets to lazyload DB