Re: Solaris is complaining about the following



parag_paul@xxxxxxxxxxx wrote:
static char* nullStr = "null";


This line in the solaris mode64 ( cc -m64 flag, gives out the
following warning message )

"virvpirw.cc", line 371: Warning: String literal converted to char* in
initialization.
1 Warning(s) detected.



Now our builds are strict and dont allow this warning too in the
building. Can we remove this by any other way.

Two-and-a-half suggestions:

1) static const char* nullStr = "null";

2) Use a C compiler rather than a C++ compiler.

2a) ... or take further questions to comp.lang.c++

--
Eric Sosman
esosman@xxxxxxxxxxxxxxxxxxxx
.



Relevant Pages

  • Re: while (1) vs. for ( ;; )
    ... >> I was surprised at how many people reported that a compiler ... >> better expression (lower defect rate, higher productivity, ... There is for some developers. ... effects of a warning message issued by a compiler, ...
    (comp.lang.c)
  • Re: Getting the lr register in a C subroutine
    ... you can't do this in ADS without assembler. ... > The compiler can place the return address whereever it wants, ... The routine I would create is a controled one and all it will do is get ... about happens here, the only problem is the warning message, that to me ...
    (comp.sys.arm)
  • Compiler Warning C4373 about virtual methods
    ... The following code will result in C4373 warning message. ... What means "bind"? ... either the base or derived class. ... Versions of the compiler prior to Visual C++ 2008 bind the function to the ...
    (microsoft.public.vc.language)
  • Re: gets() - dangerous? (Are we having fun yet?)
    ... >>> It is up to the programmer to determine whether the condition ... > which should raise the same conditions at assignment time, ... > the same warning message. ... > a function has long since escaped the view of the compiler. ...
    (comp.lang.c)
  • Re: Getting the lr register in a C subroutine
    ... changing to a different compiler ... >the only problem is the warning message, ... > the warning message as soon lr is in the inline assembler. ... The warning is emitted for all registers, ...
    (comp.sys.arm)