[Libreoffice] [PATCH] new cppcheck cleaning in svx
Radek Doulik
rodo at novell.com
Wed Jan 5 03:25:01 PST 2011
Hi Julien,
thanks for your patches. They look OK so I pushed them.
Cheers
Radek
On Thu, 2010-12-30 at 00:51 +0100, Julien Nabet wrote:
> Hello,
>
> Here are 2 new patches for cppcheck cleaning in svx
> Compiling was ok
>
> Remarks :
> I had this with the last "git version" of cppcheck :
> 1)
> [./svdotxln.cxx:67]: (style) The class 'ImpSdrObjTextLink' does not have
> a constructor.
> but we can read this on the file :
> class ImpSdrObjTextLink: public ::sfx2::SvBaseLink
> {
> SdrTextObj* pSdrObj;
>
> public:
> ImpSdrObjTextLink( SdrTextObj* pObj1 )
> : ::sfx2::SvBaseLink( ::sfx2::LINKUPDATE_ONCALL, FORMAT_FILE ),
> pSdrObj( pObj1 )
> {}
> ...
>
> It seems there is a constructor, doesn't it ? So either if it's a false
> positive and i do a tracker or it's ok and i would need some explanation
> (please ! :-) ).
>
>
>
>
> 2)
> in view3d.cxx, I've got this :
> [./view3d.cxx:299]: (style) Variable 'pM' is assigned a value that is
> never used
> but either pM should be used (and i don't know how) or pM is useless and
> this entire line too :
> pM = GetSdrMarkByIndex(nObjs);
>
> 3)
> Checking ./gridctrl.cxx...
> [./gridctrl.cxx:3720]: (error) Possible null pointer dereference:
> pListeners - otherwise it is redundant to check if pListeners is null at
> line 3722
> but I don't know what to do with this.
>
> There are still some cppcheck in svx, i hope to correct all of them soon.
>
> Julien
> (LGPLv3+ / MPL)
> _______________________________________________
> LibreOffice mailing list
> LibreOffice at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/libreoffice
More information about the LibreOffice
mailing list