Cppcheck: false positive in pptx-text.cxx ?

julien2412 serval2412 at yahoo.fr
Sun Jan 20 10:24:41 PST 2013


Hello,

Cppcheck reported this:
sd/source/filter/eppt/pptx-text.cxx
1235	copyCtorPointerCopying	style	Value of pointer 'mpImplTextObj', which
points to allocated memory, is copied in copy constructor instead of
allocating new memory.

   1233 TextObj::TextObj( const TextObj& rTextObj )
   1234 {
   1235     mpImplTextObj =
const_cast<TextObj&>(rTextObj).mpImplTextObj;
   1236     mpImplTextObj->mnRefCount++;
   1237 }

I must recognize I don't know what to think about this since I know too
little about C++.
Something is wrong here or just a false positive?

Julien 



--
View this message in context: http://nabble.documentfoundation.org/Cppcheck-false-positive-in-pptx-text-cxx-tp4030662.html
Sent from the Dev mailing list archive at Nabble.com.


More information about the LibreOffice mailing list