C++ .. Lint warning

From: myName (myhandle_at_myweb.com)
Date: 05/17/04


Date: Mon, 17 May 2004 14:40:03 +0530

Hi All,
Getting warning in lint for this code. Any thought on this?

Regards
Ajay

StcStackInterface::StcStackInterface()
   : genAlarm( false ),
     trace( false ),
     status( unboundStatus ),
     localSuId( 0 ),
     evcKernel( 0 )
{
   // all the flags are initialized to false

   sapList = new (StcLowerSapBase*)[ maxStcSaps ]; // This line giving warning

   for( int i = 0; i < maxStcSaps; i++ ) {
      sapList[i] = 0;
   }
//...
}

Lint Warning:
=============
Info 1732: new in constructor for class 'StcStackInterface' which has no
assignment operator
   sapList = new (StcLowerSapBase*)[ maxStcSaps ];



Relevant Pages

  • Re: [C] lint warnings
    ... I changed my lint options to omit the "incompatible types" warning. ... and going out of scope without being freed and complains. ...
    (alt.comp.lang.learn.c-cpp)
  • Re: lint warning
    ... But when I use lint to check my code I get the bellow mentioned ... helloWorld.c:4:2: Called procedure printf may access file system ... to put up with in splint. ...
    (comp.lang.c)
  • Re: lint warning
    ... So that I wrote simple c program as mentioned bellow ... But when I use lint to check my code I get the bellow mentioned ... Absurdly strict checking. ...
    (comp.lang.c)
  • Re: What type is array indices converted to?
    ... As the enigmatic user923005 opines, we do need to see the code if we ... including all relevant type information. ... warning from lint just bullsh-t or should I be worried that my ...
    (comp.lang.c)
  • Re: creat() - security hole?
    ... It's not creat() per se (though I'd be just ... I think the point of 'security' tests in something like lint is to ... requiring greater alignment results in a warning. ... I always treat lint and compiler warnings as "look a lot more closely ...
    (comp.unix.programmer)