Cppcheck: Same expression in testzipimpl.cxx

Caolán McNamara caolanm at redhat.com
Thu Jan 24 08:29:17 PST 2013


On Sun, 2013-01-20 at 09:43 -0800, julien2412 wrote:
> Hello,
> 
> Cppcheck reported this:
> shell/qa/zip/testimpl/testzipimpl.cxx
>      52 bool TestZipImpl::test_directory()
>      53 {
>      54     ZipFile::DirectoryPtr_t contents = zipFile.GetDirectory();
>      55     vector<string> &stringVector = *contents.get();
>      56     sort(stringVector.begin(), stringVector.end());
>      57     return expectedContents == expectedContents;
>      58 }
> 
> Shouldn't it be
> return expectedContents == stringVector;

Yeah, it surely must have been intended to be as you say. You might as
well make that change. As an aside that test isn't built or run.

C.



More information about the LibreOffice mailing list