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.
#include <some_unfound_header_that_has_the_foo_template> class bar : public foo< int > { virtual void apple(); }; void bar::apple() { std::cout << "hello world" << std::endl; }
_______________________________________________ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice