[R-pkg-devel] warning: explicit assigning values of variable of type ....

Søren Højsgaard @orenh @end|ng |rom m@th@@@u@dk
Fri Jun 7 06:04:09 CEST 2024


Thanks :)

-----Original Message-----
From: Iris Simmons <ikwsimmo using gmail.com<mailto:Iris%20Simmons%20%3cikwsimmo using gmail.com%3e>>
To: Søren Højsgaard <sorenh using math.aau.dk<mailto:%3d%3fISO-8859-1%3fQ%3fS%3dF8ren_H%3dF8jsgaard%3f%3d%20%3csorenh using math.aau.dk%3e>>
Cc: List r-package-devel <r-package-devel using r-project.org<mailto:List%20r-package-devel%20%3cr-package-devel using r-project.org%3e>>
Subject: Re: [R-pkg-devel] warning: explicit assigning values of variable of type ....
Date: 06/07/2024 02:13:26 AM

Unless I'm misunderstanding, you're trying to pass a value by name to a function. That is not a thing in C nor C++. However if you want to name the arguments, you can do so with comments:

/* print = */ print

On Thu, Jun 6, 2024, 19:16 Søren Højsgaard via R-package-devel <r-package-devel using r-project.org<mailto:r-package-devel using r-project.org>> wrote:
Dear all,

From CRAN maintainers I recieve:


Flavor: r-devel-linux-x86_64-debian-gcc
Check: whether package can be installed, Result: WARNING
  Found the following significant warnings:
    grips_fit_ips.cpp:149:45: warning: explicitly assigning value of variable of type 'int' to itself [-Wself-assign]
    grips_fit_ips.cpp:213:16: warning: explicitly assigning value of variable of type 'int' to itself [-Wself-assign]
    grips_fit_ips.cpp:254:10: warning: explicitly assigning value of variable of type 'int' to itself [-Wself-assign]
    grips_fit_ips.cpp:254:21: warning: explicitly assigning value of variable of type 'double' to itself [-Wself-assign]



The first warning pertains to the line:

    conips_inner_(S, K, elst0, clist0, print=print);

print on lhs of "=" is the formal name and print on rhs of "=" the name of a variable. Does the compiler think I assign an integer
to itself? Like if I write

int a=7;
a=a;

Can anyone help me throw light on this?

Thanks in advance
Søren
______________________________________________
R-package-devel using r-project.org<mailto:R-package-devel using r-project.org> mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


	[[alternative HTML version deleted]]



More information about the R-package-devel mailing list