Skip to content
Prev 2548 / 12125 Next

[R-pkg-devel] Warnings and error message in CRAN Package Check Results

On 24/03/2018 9:28 AM, Wenchao Ma wrote:
The compilers on those systems are set up to be more sensitive to coding 
problems than yours.

The Solaris error comes from your code

  arma::umat B = arma::ones<arma::umat>(K,pow(2,K)-K-1);

The library you're using has no function definition for pow() that takes 
2 integers.  If a float or double result is okay, you could use pow(2.0, 
K).  If you really need an int in that argument, you'll need to typecast 
or write your own pow() function.

The Fedora warning seems self explanatory:

Mstep.cpp:62:69: warning: explicitly assigning value of variable of type 
'int' to itself [-Wself-assign]

Take a look at that line (and the other similar ones) and see why the 
compiler thinks you've got something like

i = i;

in your code.

Duncan Murdoch