0

I am submitting an R package to biocondutor, which contains some RcppArmadillo codes. I got some complaints from one platform for the operation between uword and int. In the following, drop_bin(0) is uword and bin_number is an integer. This error happens when I compare the uword with integer. However I don't see errors when I run it in my mac osx at all. Is there any way to get around it? Thanks.

degnormCPP.cpp: In function 'arma::uvec bin_drop(int, int, arma::rowvec)':
degnormCPP.cpp:27:18: warning: comparison of integer expressions of different signedness: 'unsigned int' and 'int' [-Wsign-compare]

   if (drop_bin(0)==bin_number-1){...}
       ~~~~~~~~~~~^~~~~~~~~~~~~~

degnormCPP.cpp: In function 'Rcpp::List optiNMFCPP(arma::mat, arma::vec, int)':

1 Answers1

0

I guess I found the answer by cast.

if ((int) drop_bin(0)==bin_number-1){...}

bioconductor seems not complaining anymore