[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: List of about 15 bugs in netmanager/clientmanager/distmanager/utils



Most of the list is of course a little silly, but there were some
important things:

* Another messmanager bug, I fixed that.

* Remove the OneStr() interface to Hash -- this is not used (it is
commented out in HTTPRequest10.cc)

* Someone should fix the memory leak problem in the HTTPRequest
interfaces.  This is a pretty easy change.

The rest of the messages were just fluff (though I added a return to 
main()).  I went through the second list (cw_mnemonic) which was huge, and
removed all the obvious ones:

* If you use virtual functions, use a virtual destructor.
* Use new/delete, not malloc/free.
* Clean up your interfaces.

I'm attaching the ones that might be important... the warnings I selected
were representative -- if you see one warning, look for others of that
same type in the code you are responsible for.

Andrew

[../../src/dispmanager/tools.h:47] Return objects by reference instead of by value
    Violation: Effective C++ item 22
    Function reunion returns object by value

[../../src/dispmanager/tools.h:55] Return objects by reference instead of by value
    Violation: Effective C++ item 22
    Function getPosition returns object by value

[../../src/dispmanager/tools.h:56] Return objects by reference instead of by value
    Violation: Effective C++ item 22
    Function getSize returns object by value

[../../src/dispmanager/Tag.h:75] Avoid returning "handles" to internal data from const member functions
    Severe violation: Effective C++ item 29

[../../src/utils/thread.h:60] Return objects by reference instead of by value
    Violation: Effective C++ item 22
    Function signal returns object by value

[../../src/utils/thread.h:61] Return objects by reference instead of by value
    Violation: Effective C++ item 22
    Function wait returns object by value

[FILEUrl.h:14] Avoid calling virtual functions from constructors and destructors
    Severe violation: Meyers-Klaus item 13
    Virtual function PostConstructor called.

[HTTPDate.h:34] Avoid member functions that return pointers or references to members less accessible than themselves
    Violation: Effective C++ item 30

[gtkFormatter.cc:31] Destructor should call delete on all pointer members
    Violation: Effective C++ item 6
    Class Iterator has no explicit destructor, and contains pointer members:
       current
       attr  ** allocated in constructor **

[gtkFormatter.cc:42] Avoid calling virtual functions from constructors and destructors
    Severe violation: Meyers-Klaus item 13
    Virtual function IsA called.

[Gif_image.h:9] Destructor should call delete on all pointer members
    Violation: Effective C++ item 6
    Class Gif_image has no explicit destructor, and contains pointer members:
       image  ** allocated in constructor **
       color_map
       next