[R] e1071, R1.9.0, Solaris 2.9, should I be worried?

Thomas Lumley tlumley at u.washington.edu
Mon Jun 14 00:07:35 CEST 2004


On Sun, 13 Jun 2004, Rong-En Fan wrote:

> On Tue, May 25, 2004 at 04:38:44PM +1200, Richard A. O'Keefe wrote:
> > In R 1.9.0 running under Solaris 2.9 on a SunBlade 100,
> > with "Sun WorkShop 6 update 2 C++ 5.3 2001/05/15" as the
> > C++ compiler, I just did
>
> >
> > How worried should I be?
> > I guess the "Warning: x hides Solver::x" warnings related to a deliberate
> > style choice, but what about the "String literal converted to char*" ones?
>
> as the message says, things like
>
> info("Exceeds max_iter in multiclass_prob\n");
>
> and the info() accepts char * as parameter
>

The warning is because this line of code is valid only as long as info()
does not modify its argument.  Assigning a string literal to a "char *"
rather than the more logical "const char *" is valid C even without a cast
(partly for backwards compatibility reasons), but most compilers have an
option to give warnings (in gcc it's --Wwriteable-strings) because of the
risks.

 If info() in fact does not modify its argument then there is no problem.

	-thomas




More information about the R-help mailing list