Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


On 02/16/11 12:43, Caolán McNamara wrote:
On Sat, 2011-02-12 at 13:26 +0100, Julien Nabet wrote:
Hello

With the last git version of cppcheck, I've got in the master branch 
writer/sw/source/ui/dbui this :
[./dbmgr.cxx:222]: (style) Unused private function 
'SwConnectionDisposedListener_Impl::disposing'

I don't understand these errors and so how to correct them.
If it's a false positive cppcheck, I don't understand why.

So, this is basically one of a bunch of problems that cppcheck shows
because it's not able to find all the headers and so it can't tell that
the thing that dbmgr.cxx inherits from defines a public virtual void
disposing(); so it hopes for the best and notices that the disposing
here is in a "private" section and lets us know that from all cppcheck
can tell this is a private method that isn't called. Reduced test-case
attached if you want to report it.

But this is poor stylistically anyway so probably best to just fix it in
dbmgr.cxx by adding a public: before disposing and/or moving disposing
after private:

C.



_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Hi Caolán,

So cppcheck can't find the headers it needs? Is this a bug in cppcheck,
or LO's construction of header file paths? And how many examples of
cppcheck false positives due to this problem are present? Does a clear
example of where cppcheck *should* find the headers but *doesn't* exist?

Is there a way to prevent this particular problem for cppcheck?

Cheers,

Jesse Adelman
Linux Systems Consultant
http://ilikelinux.com/
http://www.boldandbusted.com/
Brisbane, CA USA

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.